Fixes for clang-tidy-9
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / pdb2top.cpp
index b58dd35433077734374ea96e6167bc94ffe15355..d4df1c2718368af5f4fd43332399053fc0fe5ec1 100644 (file)
@@ -840,11 +840,7 @@ static bool pcompar(const InteractionOfType& a, const InteractionOfType& b)
 {
     int d;
 
-    if ((d = a.ai() - b.ai()) != 0)
-    {
-        return d < 0;
-    }
-    else if ((d = a.aj() - b.aj()) != 0)
+    if (((d = a.ai() - b.ai()) != 0) || ((d = a.aj() - b.aj()) != 0))
     {
         return d < 0;
     }