mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
perf: 明确api参数及返回值类型,并兼容原先接口
This commit is contained in:
@@ -26,6 +26,7 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
|
||||
auto full_path = path / Filename; \
|
||||
bool ret = load_resource<Config>(full_path); \
|
||||
if (!ret) { \
|
||||
m_loaded = false; \
|
||||
Log.error(#Config, " load failed, path:", full_path); \
|
||||
return false; \
|
||||
} \
|
||||
@@ -38,6 +39,7 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
|
||||
auto full_templ_dir = path / TemplDir; \
|
||||
bool ret = load_resource_with_templ<Config>(full_path, full_templ_dir); \
|
||||
if (!ret) { \
|
||||
m_loaded = false; \
|
||||
Log.error(#Config, "load failed, path:", full_path, ", templ dir:", full_templ_dir); \
|
||||
return false; \
|
||||
} \
|
||||
@@ -72,3 +74,8 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool asst::ResourceLoader::loaded() const noexcept
|
||||
{
|
||||
return m_loaded;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user