Skip to content
Snippets Groups Projects
Commit 7cfddaef authored by Mark OLESEN's avatar Mark OLESEN
Browse files

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

parent 3bf486b2
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd. \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -68,7 +70,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst) ...@@ -68,7 +70,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst)
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;
...@@ -88,7 +90,6 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst, const bool doSort) ...@@ -88,7 +90,6 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& lst, const bool doSort)
{} {}
template<class T> template<class T>
inline Foam::Pair<T>::Pair(Istream& is) inline Foam::Pair<T>::Pair(Istream& is)
: :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment