Remove std::move from trivially-copyable types. NFC.

Found by clang-tidy
pull/479/head
Ryan Pavlik 2019-08-20 14:43:51 -05:00 committed by whitequark
parent c0904e2ba8
commit 3e566d7e67
1 changed files with 3 additions and 2 deletions

View File

@ -540,7 +540,7 @@ void BitmapFont::AddGlyph(char32_t codepoint, std::shared_ptr<const Pixmap> pixm
BitmapFont::Glyph glyph = {}; BitmapFont::Glyph glyph = {};
glyph.advanceCells = (uint8_t)(pixmap->width / 8); glyph.advanceCells = (uint8_t)(pixmap->width / 8);
glyph.position = nextPosition++; glyph.position = nextPosition++;
glyphs.emplace(codepoint, std::move(glyph)); glyphs.emplace(codepoint, glyph);
for(size_t y = 0; y < pixmap->height; y++) { for(size_t y = 0; y < pixmap->height; y++) {
uint8_t *row = BitmapFontTextureRow(texture, glyph.position, 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; textureUpdated = true;
return (*it).second; return (*it).second;
} }