mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
refactor: 将连接字符串改为使用 StrUtils::Concat
This commit is contained in:
parent
19ffb76203
commit
dec4f30bf7
9 changed files with 27 additions and 27 deletions
|
|
@ -187,7 +187,7 @@ bool EffectCacheManager::_LoadFromMemCache(const std::wstring& cacheFileName, Ef
|
|||
if (it != _memCache.end()) {
|
||||
desc = it->second.first;
|
||||
it->second.second = ++_lastAccess;
|
||||
Logger::Get().Info(fmt::format("已读取缓存 {}", StrUtils::UTF16ToUTF8(cacheFileName)));
|
||||
Logger::Get().Info(StrUtils::Concat("已读取缓存 ", StrUtils::UTF16ToUTF8(cacheFileName)));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -232,7 +232,7 @@ bool EffectCacheManager::Load(std::string_view effectName, std::string_view hash
|
|||
|
||||
_AddToMemCache(cacheFileName, desc);
|
||||
|
||||
Logger::Get().Info("已读取缓存 " + StrUtils::UTF16ToUTF8(cacheFileName));
|
||||
Logger::Get().Info(StrUtils::Concat("已读取缓存 ", StrUtils::UTF16ToUTF8(cacheFileName)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ void EffectCacheManager::Save(std::string_view effectName, std::string_view hash
|
|||
Utils::Hasher::Get().GetHashLength() * 2), std::wregex::optimize | std::wregex::nosubs);
|
||||
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind = Utils::SafeHandle(FindFirstFile(L".\\cache\\*", &findData));
|
||||
HANDLE hFind = Utils::SafeHandle(FindFirstFile(StrUtils::ConcatW(CACHE_DIR, L"\\*").c_str(), &findData));
|
||||
if (hFind) {
|
||||
while (FindNextFile(hFind, &findData)) {
|
||||
if (StrUtils::StrLen(findData.cFileName) < 8) {
|
||||
|
|
@ -300,7 +300,7 @@ void EffectCacheManager::Save(std::string_view effectName, std::string_view hash
|
|||
|
||||
_AddToMemCache(cacheFileName, desc);
|
||||
|
||||
Logger::Get().Info("已保存缓存 " + StrUtils::UTF16ToUTF8(cacheFileName));
|
||||
Logger::Get().Info(StrUtils::Concat("已保存缓存 ", StrUtils::UTF16ToUTF8(cacheFileName)));
|
||||
}
|
||||
|
||||
std::string EffectCacheManager::GetHash(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue