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:
@@ -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; });
|
||||
|
||||
Reference in New Issue
Block a user