Merge pull request #129 from lioncash/emplace

CGuiTextSupport: Make use of emplace_back() in AddText()
This commit is contained in:
Phillip Stephens 2020-01-30 20:10:41 -08:00 committed by GitHub
commit 004d8bab22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -215,8 +215,8 @@ void CGuiTextSupport::SetFontColor(const zeus::CColor& col) {
void CGuiTextSupport::AddText(std::u16string_view str) {
if (x60_renderBuf) {
float t = GetCurrentAnimationOverAge();
x40_primStartTimes.push_back(std::make_pair(std::max(t, x3c_curTime), x60_renderBuf->GetPrimitiveCount()));
const float t = GetCurrentAnimationOverAge();
x40_primStartTimes.emplace_back(std::max(t, x3c_curTime), x60_renderBuf->GetPrimitiveCount());
}
x0_string += str;
ClearRenderBuffer();