mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 11:40:14 +00:00
Common: Use unlikely() to optimise for the common path in GetUserPath().
This commit is contained in:
parent
d909f18195
commit
71bb787798
@ -727,7 +727,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
||||
static std::string paths[NUM_PATH_INDICES];
|
||||
|
||||
// Set up all paths and files on the first run
|
||||
if (paths[D_USER_IDX].empty())
|
||||
if (unlikely(paths[D_USER_IDX].empty()))
|
||||
{
|
||||
#ifdef _WIN32
|
||||
paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
|
||||
@ -768,7 +768,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
}
|
||||
|
||||
if (!newPath.empty())
|
||||
if (unlikely(!newPath.empty()))
|
||||
{
|
||||
if (!FileUtil::IsDirectory(newPath))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user