mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 04:51:48 +00:00
Changed: Replace ~0 by std::numeric_limits
This commit is contained in:
parent
852a5ee1a9
commit
e307920121
1 changed files with 5 additions and 3 deletions
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include "nel/misc/common.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
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<TPropIndex>::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<TPropIndex>::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<TPropIndex>::max(); }
|
||||
|
||||
/// Return the level of the node in a tree (root=1)
|
||||
uint getLevel() const
|
||||
|
|
Loading…
Reference in a new issue