From 3e566d7e67cea8dbbc74aa4d5c729c890044f671 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 20 Aug 2019 14:43:51 -0500 Subject: [PATCH] Remove std::move from trivially-copyable types. NFC. Found by clang-tidy --- src/resource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resource.cpp b/src/resource.cpp index 569d95e..6e9ce72 100644 --- a/src/resource.cpp +++ b/src/resource.cpp @@ -540,7 +540,7 @@ void BitmapFont::AddGlyph(char32_t codepoint, std::shared_ptr pixm BitmapFont::Glyph glyph = {}; glyph.advanceCells = (uint8_t)(pixmap->width / 8); glyph.position = nextPosition++; - glyphs.emplace(codepoint, std::move(glyph)); + glyphs.emplace(codepoint, glyph); for(size_t y = 0; y < pixmap->height; y++) { uint8_t *row = BitmapFontTextureRow(texture, glyph.position, y); @@ -623,7 +623,8 @@ const BitmapFont::Glyph &BitmapFont::GetGlyph(char32_t codepoint) { } } - it = glyphs.emplace(codepoint, std::move(glyph)).first; + it = glyphs.emplace(codepoint, glyph).first; + textureUpdated = true; return (*it).second; }