CLogBookScreen: Use std::u16string's append() member instead of operator+

Appends to the existing buffer instead of constructing a superfluous
temporary.
This commit is contained in:
Lioncash 2019-10-15 10:03:52 -04:00
parent d64824d3e5
commit b93f7a4ceb
1 changed files with 4 additions and 3 deletions

View File

@ -187,9 +187,10 @@ void CLogBookScreen::UpdateBodyText() {
}
if (IsArtifactCategorySelected()) {
int headIdx = GetSelectedArtifactHeadScanIndex();
if (headIdx >= 0 && g_GameState->GetPlayerState()->HasPowerUp(CPlayerState::EItemType(headIdx + 29)))
accumStr = std::u16string(u"\n\n\n\n\n\n") + g_MainStringTable->GetString(105);
const int headIdx = GetSelectedArtifactHeadScanIndex();
if (headIdx >= 0 && g_GameState->GetPlayerState()->HasPowerUp(CPlayerState::EItemType(headIdx + 29))) {
accumStr = std::u16string(u"\n\n\n\n\n\n").append(g_MainStringTable->GetString(105));
}
}
x174_textpane_body->TextSupport().SetText(accumStr, true);