From 2b0189cdd8b4563cf9458cc3fbde072f3fb2e35f Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Thu, 25 Jul 2019 14:38:05 +0200 Subject: [PATCH] [io][grid][gmshflag] Use numeric limits of size_t for invalid flag --- dumux/io/grid/gmshboundaryflag.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dumux/io/grid/gmshboundaryflag.hh b/dumux/io/grid/gmshboundaryflag.hh index 327225e72d..b7a476b1a3 100644 --- a/dumux/io/grid/gmshboundaryflag.hh +++ b/dumux/io/grid/gmshboundaryflag.hh @@ -25,6 +25,7 @@ #ifndef DUMUX_GMSH_BOUNDARY_FLAG_HH #define DUMUX_GMSH_BOUNDARY_FLAG_HH +#include <limits> namespace Dumux { @@ -35,10 +36,12 @@ namespace Dumux { class GmshBoundaryFlag { public: - GmshBoundaryFlag() : flag_(-1) {} + GmshBoundaryFlag() + : flag_(std::numeric_limits<std::size_t>::max()) {} template<class Intersection> - GmshBoundaryFlag(const Intersection& i) : flag_(-1) + GmshBoundaryFlag(const Intersection& i) + : flag_(std::numeric_limits<std::size_t>::max()) { if (i.boundary()) flag_ = i.boundarySegmentIndex(); -- GitLab