From 7498a24c4d3b9ccebb8101fab79a32cfe22753f0 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Tue, 25 Feb 2014 14:08:11 +0100 Subject: [PATCH] added break if all error codes are already set --- MeshLib/Elements/TemplateHex.tpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MeshLib/Elements/TemplateHex.tpp b/MeshLib/Elements/TemplateHex.tpp index e416b5c4441..9388ac7f2ae 100644 --- a/MeshLib/Elements/TemplateHex.tpp +++ b/MeshLib/Elements/TemplateHex.tpp @@ -163,12 +163,12 @@ ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::isValid() const for (unsigned i=0; i<6; ++i) { - if (!error_code.all()) - { - const MeshLib::Element* quad (this->getFace(i)); - error_code |= quad->isValid(); - delete quad; - } + if (error_code.all()) + break + + const MeshLib::Element* quad (this->getFace(i)); + error_code |= quad->isValid(); + delete quad; } return error_code; } -- GitLab