From 859b4d6286c2a5e384d9ed34e191b208f7ce938c Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 11 May 2020 16:21:00 +0200
Subject: [PATCH] BUG: Pair sort on construct did the opposite (fixes #1701)

---
 src/OpenFOAM/primitives/Pair/PairI.H | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/OpenFOAM/primitives/Pair/PairI.H b/src/OpenFOAM/primitives/Pair/PairI.H
index d9462615066..3882666b5dc 100644
--- a/src/OpenFOAM/primitives/Pair/PairI.H
+++ b/src/OpenFOAM/primitives/Pair/PairI.H
@@ -5,7 +5,7 @@
     \\  /    A nd           | www.openfoam.com
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
-    Copyright (C) 2017-2019 OpenCFD Ltd.
+    Copyright (C) 2017-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -89,7 +89,7 @@ inline Foam::Pair<T>::Pair(const FixedList<T, 2>& list)
 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;
-- 
GitLab