[Cache] Fix

- removed Mutex in GetUrl() to speed up startup
This commit is contained in:
/dev/root 2016-11-25 12:48:52 +01:00
parent 90a9b72aac
commit 0221954b41

View File

@ -14,16 +14,7 @@ namespace Utils
std::string Cache::GetUrl(std::string path) std::string Cache::GetUrl(std::string path)
{ {
std::lock_guard<std::mutex> _(Cache::CacheMutex); return Cache::Urls[ARRAY_SIZE(Cache::Urls) - 1] + path;
if (Cache::ValidUrl.empty())
{
return Cache::Urls[0] + path;
}
else
{
return Cache::ValidUrl + path;
}
} }
std::string Cache::GetUrl(std::string url, std::string path) std::string Cache::GetUrl(std::string url, std::string path)