blob: 5fde578a188e3329243e824e49798949b44bf510 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "oddbool.h"
ComparisonTester::ComparisonTester(int v) : m_value(v)
{
}
ComparisonTester &ComparisonTester::operator=(int v)
{
m_value = v;
return *this;
}
int ComparisonTester::compare(const ComparisonTester &rhs) const
{
if (m_value < rhs.m_value)
return -1;
if (m_value > rhs.m_value)
return 1;
return 0;
}
|