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

General: Make use of explicit constructors where applicable

Gets rid of potential error prone implicitly constructing constructors.
This commit is contained in:
Lioncash
2020-03-25 21:25:11 -04:00
parent f4b3fb947e
commit 241a66dc0a
50 changed files with 117 additions and 111 deletions

View File

@@ -44,7 +44,7 @@ class CFontInstruction : public CInstruction {
TLockedToken<CRasterFont> x4_font;
public:
CFontInstruction(const TToken<CRasterFont>& font) : x4_font(font) {}
explicit CFontInstruction(const TToken<CRasterFont>& font) : x4_font(font) {}
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void GetAssets(std::vector<CToken>& assetsOut) const override;
@@ -55,7 +55,7 @@ class CLineExtraSpaceInstruction : public CInstruction {
s32 x4_extraSpace;
public:
CLineExtraSpaceInstruction(s32 extraSpace) : x4_extraSpace(extraSpace) {}
explicit CLineExtraSpaceInstruction(s32 extraSpace) : x4_extraSpace(extraSpace) {}
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
};
@@ -107,7 +107,7 @@ class CLineSpacingInstruction : public CInstruction {
float x4_lineSpacing;
public:
CLineSpacingInstruction(float spacing) : x4_lineSpacing(spacing) {}
explicit CLineSpacingInstruction(float spacing) : x4_lineSpacing(spacing) {}
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
};
@@ -128,7 +128,7 @@ class CRemoveColorOverrideInstruction : public CInstruction {
int x4_idx;
public:
CRemoveColorOverrideInstruction(int idx) : x4_idx(idx) {}
explicit CRemoveColorOverrideInstruction(int idx) : x4_idx(idx) {}
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
};
@@ -137,7 +137,7 @@ class CImageInstruction : public CInstruction {
CFontImageDef x4_image;
public:
CImageInstruction(const CFontImageDef& image) : x4_image(image) {}
explicit CImageInstruction(const CFontImageDef& image) : x4_image(image) {}
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override;
void GetAssets(std::vector<CToken>& assetsOut) const override;
size_t GetAssetCount() const override;