- Switched from size()>0 to empty().

- Code cleanup.
This commit is contained in:
spx
2011-11-08 17:21:29 +00:00
parent f2f97743ef
commit 569a151c6c
8 changed files with 31 additions and 36 deletions

View File

@ -1229,7 +1229,7 @@ void CSystem::GetIniFileMappingList(std::vector<std::wstring>& iniFileMappings)
** GetTemporaryFile
**
** Prepares a temporary file if iniFile is included in the "IniFileMapping" entries.
** If iniFile is not included, returns a empty string. If error occurred, returns "<>".
** If iniFile is not included, returns a empty string. If error occurred, returns "?".
** Note that a temporary file must be deleted by caller.
**
*/
@ -1272,14 +1272,14 @@ std::wstring CSystem::GetTemporaryFile(const std::vector<std::wstring>& iniFileM
else // temporary is reserved or failed
{
RemoveFile(temporary);
if (tmp.empty()) tmp = L"<>";
if (tmp.empty()) tmp = L"?";
return tmp;
}
}
else // failed
{
LogWithArgs(LOG_ERROR, L"Unable to create temporary file to: %s", temporary.c_str());
return L"<>";
return L"?";
}
}
}