浏览代码

core: fix build

Daniele Bartolini 3 年之前
父节点
当前提交
03775397c8
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 4 4
      src/core/strings/string_id.inl
  2. 2 2
      src/core/types.h

+ 4 - 4
src/core/strings/string_id.inl

@@ -73,16 +73,16 @@ struct hash<StringId64>
 };
 
 #if CROWN_DEBUG && !CROWN_DEVELOPMENT
-inline u32 STRING_ID_32(const char *str, const u32 id)
+inline StringId32 STRING_ID_32(const char *str, const u32 id)
 {
 	CE_ASSERT(murmur32(str, strlen32(str), 0) == id, "Hash mismatch");
-	return id;
+	return StringId32(id);
 }
 
-inline u64 STRING_ID_64(const char *str, const u64 id)
+inline StringId64 STRING_ID_64(const char *str, const u64 id)
 {
 	CE_ASSERT(murmur64(str, strlen32(str), 0) == id, "Hash mismatch");
-	return id;
+	return StringId64(id);
 }
 #endif
 /// @}

+ 2 - 2
src/core/types.h

@@ -67,8 +67,8 @@ inline bool constexpr is_power_of_2(u32 x)
 }
 
 #if CROWN_DEBUG && !CROWN_DEVELOPMENT
-u32 STRING_ID_32(const char *str, const u32 id);
-u64 STRING_ID_64(const char *str, const u64 id);
+struct StringId32 STRING_ID_32(const char *str, const u32 id);
+struct StringId64 STRING_ID_64(const char *str, const u64 id);
 #else
 	#define STRING_ID_32(str, id) StringId32(id)
 	#define STRING_ID_64(str, id) StringId64(id)