From b93f7a4ceb24904763e02ef9c4b2eefdf29f08fb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 10:03:52 -0400 Subject: [PATCH] CLogBookScreen: Use std::u16string's append() member instead of operator+ Appends to the existing buffer instead of constructing a superfluous temporary. --- Runtime/MP1/CLogBookScreen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Runtime/MP1/CLogBookScreen.cpp b/Runtime/MP1/CLogBookScreen.cpp index 2437294c9..b0565c5a0 100644 --- a/Runtime/MP1/CLogBookScreen.cpp +++ b/Runtime/MP1/CLogBookScreen.cpp @@ -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);