恢复用size_t做为idname的索引.因为我们的索引是用hash_code产生的,传入字符串名字只是为让了typeid().hash_code()结果不一样

This commit is contained in:
2025-06-07 04:30:42 +08:00
parent 78a105affe
commit fd72f42c92
2 changed files with 7 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
namespace hgl
{
template<typename SC>
bool RegistryIDName(const char *IDNameTag,ConstStringView<SC> &csv,const SC *name_string,const int name_length);
bool RegistryIDName(const size_t hash_code,ConstStringView<SC> &csv,const SC *name_string,const int name_length);
/**
* 顺序ID+名称数据结构模板<br>
@@ -39,7 +39,7 @@ namespace hgl
return;
}
RegistryIDName<SC>(IDNAME_TAG,csv,name_string,name_length);
RegistryIDName<SC>(typeid(SelfClass).hash_code(),csv,name_string,name_length);
}
public: