Alchemy llcharacter and llcommon merge pass.
This commit is contained in:
@@ -372,12 +372,12 @@ S32 wstring_utf8_length(const LLWString& wstr)
|
||||
|
||||
LLWString utf8str_to_wstring(const std::string& utf8str, S32 len)
|
||||
{
|
||||
llwchar unichar;
|
||||
LLWString wout;
|
||||
wout.reserve(len);
|
||||
|
||||
S32 i = 0;
|
||||
while (i < len)
|
||||
for (S32 i = 0; i < len; i++)
|
||||
{
|
||||
llwchar unichar;
|
||||
U8 cur_char = utf8str[i];
|
||||
|
||||
if (cur_char < 0x80)
|
||||
@@ -453,7 +453,6 @@ LLWString utf8str_to_wstring(const std::string& utf8str, S32 len)
|
||||
}
|
||||
|
||||
wout += unichar;
|
||||
++i;
|
||||
}
|
||||
return wout;
|
||||
}
|
||||
@@ -466,16 +465,15 @@ LLWString utf8str_to_wstring(const std::string& utf8str)
|
||||
|
||||
std::string wstring_to_utf8str(const LLWString& utf32str, S32 len)
|
||||
{
|
||||
char tchars[8]; /* Flawfinder: ignore */
|
||||
std::string out;
|
||||
out.reserve(len);
|
||||
|
||||
S32 i = 0;
|
||||
while (i < len)
|
||||
for (S32 i = 0; i < len; i++)
|
||||
{
|
||||
char tchars[8]; /* Flawfinder: ignore */
|
||||
S32 n = wchar_to_utf8chars(utf32str[i], tchars);
|
||||
tchars[n] = 0;
|
||||
out += tchars;
|
||||
i++;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
@@ -812,7 +810,7 @@ std::string LLStringOps::getDatetimeCode (std::string key)
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::string("");
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1083,7 +1081,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
|
||||
}
|
||||
else if (param == "local")
|
||||
{
|
||||
replacement = ""; // user knows their own timezone
|
||||
replacement.clear(); // user knows their own timezone
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user