Ver código fonte

Add StringId32/64 typedefs and remove Id32/64

Daniele Bartolini 12 anos atrás
pai
commit
7e03844f6d
2 arquivos alterados com 3 adições e 26 exclusões
  1. 3 0
      engine/core/Types.h
  2. 0 26
      engine/core/strings/Hash.h

+ 3 - 0
engine/core/Types.h

@@ -39,6 +39,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 	#define CE_INLINE inline
 #endif
 
+typedef uint32_t StringId32;
+typedef uint64_t StringId64;
+
 #define INVALID_ID 65535
 
 struct Id

+ 0 - 26
engine/core/strings/Hash.h

@@ -32,32 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
-struct Id32
-{
-	Id32() : key(0) {}
-
-	const Id32& operator=(const Id32& other) { key = other.key; return *this; }
-	const Id32& operator=(const uint32_t other) { key = other; return *this; }
-
-	operator uint32_t() { return key; }
-
-	uint32_t key;
-};
-
-//-----------------------------------------------------------------------------
-struct Id64
-{
-	Id64() : key(0) {}
-
-	const Id64& operator=(const Id64& other) { key = other.key; return *this; }
-	const Id64& operator=(const uint64_t other) { key = other; return *this; }
-
-	operator uint64_t()	{ return key; }
-
-	uint64_t key;
-};
-
 /// String hashing.
 namespace hash
 {