This commit is contained in:
aozhiwei 2022-12-22 16:32:16 +08:00
parent 3d912791f6
commit ee93106b5e
2 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ namespace mt
res_path_ = "../res/";
}
RegMetaTable<Param>();
RegMetaTable<Param>(res_path_);
}
void MetaMgr::UnInit()

View File

@ -67,7 +67,7 @@ namespace mt
void UnInit();
template<class T>
mt::MetaTable* RegMetaTable()
mt::MetaTable* RegMetaTable(const std::string& dir)
{
mt::MetaTable* p = new mt::MetaTable();
p->static_pre_init_cb =
@ -76,9 +76,9 @@ namespace mt
SafeCallStaticPreInit<T>(0);
};
p->load_cb =
[] ()
[dir] ()
{
f8::ReadCsvMetaFile(T::table_name, T::raw_list);
f8::ReadCsvMetaFile(dir + T::table_name, T::raw_list);
int id = 0;
for (auto item : T::raw_list) {
switch (T::table_type) {