mirror of https://github.com/AxioDL/metaforce.git
CParticleDataFactory: Make operator bool() instances explicit
Gets rid of implicit error-prone conversions to bool
This commit is contained in:
parent
d6f2e27d8a
commit
1b42bda711
|
@ -30,7 +30,7 @@ struct SParticleModel {
|
||||||
CModel* m_model = nullptr;
|
CModel* m_model = nullptr;
|
||||||
SParticleModel() = default;
|
SParticleModel() = default;
|
||||||
SParticleModel(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
SParticleModel(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
||||||
operator bool() const { return m_found; }
|
explicit operator bool() const { return m_found; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SChildGeneratorDesc {
|
struct SChildGeneratorDesc {
|
||||||
|
@ -39,7 +39,7 @@ struct SChildGeneratorDesc {
|
||||||
CGenDescription* m_gen = nullptr;
|
CGenDescription* m_gen = nullptr;
|
||||||
SChildGeneratorDesc() = default;
|
SChildGeneratorDesc() = default;
|
||||||
SChildGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
SChildGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
||||||
operator bool() const { return m_found; }
|
explicit operator bool() const { return m_found; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SSwooshGeneratorDesc {
|
struct SSwooshGeneratorDesc {
|
||||||
|
@ -48,7 +48,7 @@ struct SSwooshGeneratorDesc {
|
||||||
CSwooshDescription* m_swoosh = nullptr;
|
CSwooshDescription* m_swoosh = nullptr;
|
||||||
SSwooshGeneratorDesc() = default;
|
SSwooshGeneratorDesc() = default;
|
||||||
SSwooshGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
SSwooshGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
||||||
operator bool() const { return m_found; }
|
explicit operator bool() const { return m_found; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SElectricGeneratorDesc {
|
struct SElectricGeneratorDesc {
|
||||||
|
@ -57,7 +57,7 @@ struct SElectricGeneratorDesc {
|
||||||
CElectricDescription* m_electric = nullptr;
|
CElectricDescription* m_electric = nullptr;
|
||||||
SElectricGeneratorDesc() = default;
|
SElectricGeneratorDesc() = default;
|
||||||
SElectricGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
SElectricGeneratorDesc(CToken&& tok, bool found) : m_token(std::move(tok)), m_found(found) {}
|
||||||
operator bool() const { return m_found; }
|
explicit operator bool() const { return m_found; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CParticleDataFactory {
|
class CParticleDataFactory {
|
||||||
|
|
Loading…
Reference in New Issue