2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-16 07:37:02 +00:00

General: Make use of emplace_back where applicable

Allows for in-place construction. Also results in less code to read in
certain usages.
This commit is contained in:
Lioncash
2020-03-21 00:12:13 -04:00
parent 36ac0a8d78
commit fc4df76afc
13 changed files with 38 additions and 33 deletions

View File

@@ -64,8 +64,8 @@ CRasterFont::CRasterFont(urde::CInputStream& in, urde::IObjectStore& store) {
baseline = in.readByte();
kernStart = in.readInt16Big();
}
xc_glyphs.push_back(std::make_pair(
chr, CGlyph(a, b, c, startU, startV, endU, endV, cellWidth, cellHeight, baseline, kernStart, layer)));
xc_glyphs.emplace_back(
chr, CGlyph(a, b, c, startU, startV, endU, endV, cellWidth, cellHeight, baseline, kernStart, layer));
}
std::sort(xc_glyphs.begin(), xc_glyphs.end(), [=](auto& a, auto& b) -> bool { return a.first < b.first; });