-Sanity checks from snowglobe. ...
-Null terminated a string buffer. -Mutex locks are expensive. -Realloc is my friend. -But leaks are not. -Nor are unused variables. -And buffer overruns should get lost. -bindManual shouldnt return failure if texture's already bound. -Pulled windlight and classic clouds apart into unique rendertypes. -'Client or Account' savedsettings stuff is now moar bettar. (and efficient) -Replaced LLSavedSettingsGlue with something that supports gSavedSettings, gSavedPerAccountSettings, and gCOASavedSettings -Added 'Enable Classic Clouds' checkbox to ascet performance settings panel -New cards added to gpu table. -General cleaning... -How2spell 'dimensions'?
This commit is contained in:
@@ -582,10 +582,16 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
|
||||
}
|
||||
const char CR = 13;
|
||||
|
||||
S32 i = utf8str.find(CR);
|
||||
if(i == std::string::npos)
|
||||
return utf8str; //Save us from a reserve call.
|
||||
|
||||
std::string out;
|
||||
out.reserve(utf8str.length());
|
||||
const S32 len = (S32)utf8str.length();
|
||||
for( S32 i = 0; i < len; i++ )
|
||||
if(i)
|
||||
out.assign(utf8str,0,i); //Copy previous text to buffer
|
||||
for( ++i; i < len; i++ )
|
||||
{
|
||||
if( utf8str[i] != CR )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user