perf: 简单优化下战斗头像缓存路径的获取

This commit is contained in:
MistEO
2022-12-27 00:55:20 +08:00
parent bf696de4a1
commit ebef538ed1
2 changed files with 11 additions and 8 deletions

View File

@@ -574,3 +574,11 @@ std::optional<asst::Rect> asst::BattleHelper::get_oper_rect_on_deployment(const
return oper_iter->second.rect;
}
const std::filesystem::path& asst::BattleHelper::avatar_cache_dir()
{
using namespace asst::utils::path_literals;
static const auto dir = UserDir.get() / "cache"_p / "avatars"_p;
return dir;
}