Using wstring instead of wstringstream where appropriate (#881)

This commit is contained in:
Scott Freeman 2019-12-19 04:50:31 -05:00 committed by Rudy Huyn
parent be4e437f4d
commit a21b4a2d1a
6 changed files with 57 additions and 53 deletions

View file

@ -599,16 +599,15 @@ String ^ LocalizationService::GetNarratorReadableToken(String ^ rawToken)
String ^ LocalizationService::GetNarratorReadableString(String ^ rawString)
{
wstringstream readableString{};
readableString << L"";
wstring readableString{};
wstring asWstring = rawString->Data();
for (const auto& c : asWstring)
{
readableString << LocalizationService::GetNarratorReadableToken(L"" + c)->Data();
readableString += LocalizationService::GetNarratorReadableToken(ref new String(&c, 1))->Data();
}
return ref new String(readableString.str().c_str());
return ref new String(readableString.c_str());
}
void LocalizationService::Sort(std::vector<Platform::String ^>& source)