From 08cfaf90c9b3bc57ab10912ebb51cc7096392cad Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 7 Jun 2016 13:31:21 +0200 Subject: [PATCH] Changed: Replace ~0 by std::numeric_limits --- code/ryzom/common/src/game_share/entity_types.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/common/src/game_share/entity_types.h b/code/ryzom/common/src/game_share/entity_types.h index aad2d94e9..189e7c803 100644 --- a/code/ryzom/common/src/game_share/entity_types.h +++ b/code/ryzom/common/src/game_share/entity_types.h @@ -27,6 +27,8 @@ #include "nel/misc/common.h" +#include + namespace CLFECOMMON { @@ -230,7 +232,7 @@ const uint MAX_PROPERTIES_PER_ENTITY = NB_VISUAL_PROPERTIES; // Special constant for unassociating -const TPropIndex PROPERTY_DISASSOCIATION = (TPropIndex)(~0)-1; +const TPropIndex PROPERTY_DISASSOCIATION = std::numeric_limits::max()-1; // Names (debug info) @@ -399,13 +401,13 @@ public: bool BranchHasPayload; /// Constructor - TVPNodeBase() : VPParent(NULL), VPA(NULL), VPB(NULL), PropIndex(~0), BranchHasPayload(false) {} + TVPNodeBase() : VPParent(NULL), VPA(NULL), VPB(NULL), PropIndex(std::numeric_limits::max()), BranchHasPayload(false) {} virtual ~TVPNodeBase() {} /// Return true if the node is root of a tree bool isRoot() const { return VPParent == NULL; } /// Return true if the node is leaf of a tree - bool isLeaf() const { return PropIndex != (CLFECOMMON::TPropIndex)~0; } + bool isLeaf() const { return PropIndex != std::numeric_limits::max(); } /// Return the level of the node in a tree (root=1) uint getLevel() const