2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 05:26:10 +00:00

CVisorFlare: Pass flares by value and use std::move

Same behavior, but allows calling code to move into the parameter and
avoid copies entirely.
This commit is contained in:
Lioncash
2020-03-26 00:28:31 -04:00
parent 477c5770c6
commit 2164854e87
5 changed files with 26 additions and 22 deletions

View File

@@ -27,9 +27,9 @@ std::optional<CVisorFlare::CFlareDef> CVisorFlare::LoadFlareDef(CInputStream& in
}
CVisorFlare::CVisorFlare(EBlendMode blendMode, bool b1, float f1, float f2, float f3, u32 w1, u32 w2,
const std::vector<CFlareDef>& flares)
std::vector<CFlareDef> flares)
: x0_blendMode(blendMode)
, x4_flareDefs(flares)
, x4_flareDefs(std::move(flares))
, x14_b1(b1)
, x18_f1(std::max(f1, FLT_EPSILON))
, x1c_f2(f2)