mark constructors explicit

This commit is contained in:
Arne Morten Kvarving
2023-05-16 10:50:01 +02:00
parent cb394ed19c
commit 6553e8d0b7
28 changed files with 33 additions and 33 deletions

View File

@@ -112,7 +112,7 @@ public:
Color3f();
Color3f(float r, float g, float b);
Color3f(const Color3f& other);
Color3f(ColorIdent colorIdent);
explicit Color3f(ColorIdent colorIdent);
explicit Color3f(const Color3ub& other);
Color3f& operator=(const Color3f& rhs);
@@ -158,7 +158,7 @@ public:
Color3ub();
Color3ub(ubyte r, ubyte g, ubyte b);
Color3ub(const Color3ub& other);
Color3ub(ColorIdent colorIdent);
explicit Color3ub(ColorIdent colorIdent);
explicit Color3ub(const Color3f& other);
Color3ub& operator=(const Color3ub& rhs);

View File

@@ -60,7 +60,7 @@ public:
};
public:
DebugTimer(const char* prefix, OperationMode operationMode = NORMAL);
explicit DebugTimer(const char* prefix, OperationMode operationMode = NORMAL);
~DebugTimer();
void restart(const char* msg = NULL);

View File

@@ -52,7 +52,7 @@ class Flags
public:
inline Flags();
inline Flags(const Flags& other);
inline Flags(FlagEnum flag);
explicit inline Flags(FlagEnum flag);
inline Flags& operator=(const Flags& rhs);
inline Flags& operator=(FlagEnum flag);

View File

@@ -99,7 +99,7 @@ class ref
public:
ref(T* object = NULL);
ref(const ref& other);
template<typename T2> ref(const ref<T2>& other);
template<typename T2> explicit ref(const ref<T2>& other);
~ref();
ref& operator=(T* rhs);
@@ -150,7 +150,7 @@ class cref
public:
cref(const T* object = NULL);
cref(const cref& other);
template<typename T2> cref(const cref<T2>& other);
template<typename T2> explicit cref(const cref<T2>& other);
~cref();
cref& operator=(const T* rhs);

View File

@@ -108,7 +108,7 @@ public:
using MemberCallbackAndActiveFlag = std::pair<MemberCallback, bool>;
public:
Signal( const SignalEmitter* emitter )
explicit Signal( const SignalEmitter* emitter )
: m_emitter( emitter )
{
m_emitter->addEmittedSignal( this );