From 0b0e565e0205dadc82c8ee6ba7a792dc9d8b34ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de> Date: Thu, 6 Jun 2024 16:09:14 +0200 Subject: [PATCH] Remove part of condition in if that is always true We check for diagonalsIntersect a couple of lines before. Found by Cppcheck (knownConditionTrueFalse). --- dumux/geometry/makegeometry.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumux/geometry/makegeometry.hh b/dumux/geometry/makegeometry.hh index a52258df1e..18e205c8f0 100644 --- a/dumux/geometry/makegeometry.hh +++ b/dumux/geometry/makegeometry.hh @@ -119,9 +119,9 @@ std::vector<Dune::FieldVector<CoordScalar, 3>> getReorderedPoints(const std::vec // the points do not conform with the dune ordering, re-order using GlobalPosition = Dune::FieldVector<CoordScalar, 3>; - if(!diagonalsIntersect && orientations[0] == 1) + if(orientations[0] == 1) return std::vector<GlobalPosition>{p1, p0, p2, p3}; - else if(!diagonalsIntersect && orientations[0] == -1) + else if(orientations[0] == -1) return std::vector<GlobalPosition>{p3, p1, p0, p2}; else DUNE_THROW(Dune::InvalidStateException, "Could not reorder points"); -- GitLab