War on std::string::find compares against -1 instead of std::string::npos

This commit is contained in:
Inusaito Sayori
2014-09-18 21:31:41 -04:00
parent 3b631a4f90
commit d2dd03dcba
3 changed files with 8 additions and 8 deletions

View File

@@ -226,7 +226,7 @@ void LLPrefsAscentChat::refreshValues()
mSecondsInLog = gSavedSettings.getBOOL("SecondsInLog");
std::string format = gSavedSettings.getString("ShortTimeFormat");
if (format.find("%p") == -1)
if (format.find("%p") == std::string::npos)
{
mTimeFormat = 0;
}
@@ -236,7 +236,7 @@ void LLPrefsAscentChat::refreshValues()
}
format = gSavedSettings.getString("ShortDateFormat");
if (format.find("%m/%d/%") != -1)
if (format.find("%m/%d/%") != std::string::npos)
{
mDateFormat = 2;
}