mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Pair: non-commutative comparison operator. Fixes #490.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -171,14 +171,14 @@ Pair<Type> reverse(const Pair<Type>& p)
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
bool operator==(const Pair<Type>& a, const Pair<Type>& b)
|
bool operator==(const Pair<Type>& a, const Pair<Type>& b)
|
||||||
{
|
{
|
||||||
return Pair<Type>::compare(a,b) != 0;
|
return (a.first() == b.first() && a.second() == b.second());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
bool operator!=(const Pair<Type>& a, const Pair<Type>& b)
|
bool operator!=(const Pair<Type>& a, const Pair<Type>& b)
|
||||||
{
|
{
|
||||||
return Pair<Type>::compare(a,b) == 0;
|
return !(a == b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user