From acab77f4f8e50132a0eb14b327f04b088244eb11 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Fri, 16 May 2014 15:52:26 +0200 Subject: [PATCH] add simple isValid() function to PhantomNodes --- DataStructures/PhantomNodes.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DataStructures/PhantomNodes.h b/DataStructures/PhantomNodes.h index a037dbba8..280e8f6aa 100644 --- a/DataStructures/PhantomNodes.h +++ b/DataStructures/PhantomNodes.h @@ -115,6 +115,12 @@ struct PhantomNode ); } + bool isValid() const + { + return location.isValid() && + (name_id != std::numeric_limits::max()); + } + bool operator==(const PhantomNode & other) const { return location == other.location;