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

This commit is contained in:
Mark Olesen
2020-05-11 16:17:32 +02:00
parent 3bf486b24b
commit 7cfddaef77

View File

@ -2,8 +2,10 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -68,7 +70,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst)
template<class T>
inline Foam::Pair<T>::Pair(const T& f, const T& s, const bool doSort)
{
if (doSort && f < s)
if (doSort && s < f)
{
first() = s;
second() = f;
@ -88,7 +90,6 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst, const bool doSort)
{}
template<class T>
inline Foam::Pair<T>::Pair(Istream& is)
: