remove usage of temporaries

This commit is contained in:
DeaTh-G 2025-02-20 15:25:58 +01:00
parent 7e8d5c4496
commit 59ed08b924
2 changed files with 4 additions and 6 deletions

View file

@ -682,7 +682,7 @@ void DrawRubyAnnotatedText(const ImFont* font, float fontSize, float maxWidth, c
line = ReAddRubyAnnotations(line, input.second);
if (!line.empty() && line.substr(0, 3) != "" && leadingSpace)
{
line = " " + line;
line.insert(0, " ");
}
}

View file

@ -741,12 +741,10 @@ static void DrawDescriptionContainer()
// special characters.
if (Config::Language == ELanguage::Japanese)
{
strncat(descriptionText, std::string(" " + g_installerErrorMessage).c_str(), sizeof(descriptionText) - 1);
}
else
{
strncat(descriptionText, g_installerErrorMessage.c_str(), sizeof(descriptionText) - 1);
strncat(descriptionText, " ", 1);
}
strncat(descriptionText, g_installerErrorMessage.c_str(), sizeof(descriptionText) - 1);
}
double textAlpha = ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION);