War on std::string::find compares against -1 instead of std::string::npos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user