BUG: Pair sort on construct did the opposite (fixes #1701)

This commit is contained in:
Mark Olesen
2020-05-11 16:21:00 +02:00
parent 435957ac87
commit a577f8e006

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenCFD Ltd. Copyright (C) 2017-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -89,7 +89,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& list)
template<class T> template<class T>
inline Foam::Pair<T>::Pair(const T& f, const T& s, const bool doSort) inline Foam::Pair<T>::Pair(const T& f, const T& s, const bool doSort)
{ {
if (doSort && f < s) if (doSort && s < f)
{ {
first() = s; first() = s;
second() = f; second() = f;