Mark every bool conversion as explicit
This commit is contained in:
parent
d4532ce7ff
commit
b2e23cfb56
|
|
@ -145,7 +145,7 @@ namespace Nz
|
|||
template<bool BadCall = true>
|
||||
void* operator&() const;
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
Bit& operator=(bool val);
|
||||
Bit& operator=(const Bit& bit);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Nz
|
|||
bool IsInitialized() const;
|
||||
void Uninitialize();
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
|
||||
Initializer& operator=(const Initializer&) = delete;
|
||||
Initializer& operator=(Initializer&&) = delete; ///TODO
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace Nz
|
|||
|
||||
Nz::String ToString() const;
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
operator T*() const;
|
||||
T* operator->() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Nz
|
|||
bool Reset(T* object = nullptr);
|
||||
ObjectRef& Swap(ObjectRef& ref);
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
operator T*() const;
|
||||
T* operator->() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
void SetPtr(VoidPtr ptr);
|
||||
void SetStride(int stride);
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
operator T*() const;
|
||||
T& operator*() const;
|
||||
T* operator->() const;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Nz
|
|||
String ToString() const;
|
||||
inline UInt32 ToUInt32() const;
|
||||
|
||||
inline operator bool() const;
|
||||
inline explicit operator bool() const;
|
||||
|
||||
IpAddress& operator=(const IpAddress&) = default;
|
||||
IpAddress& operator=(IpAddress&&) = default;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Nz
|
|||
|
||||
inline bool IndexBuffer::IsValid() const
|
||||
{
|
||||
return m_buffer;
|
||||
return m_buffer.IsValid();
|
||||
}
|
||||
|
||||
inline void* IndexBuffer::Map(BufferAccess access, UInt32 startIndex, UInt32 length)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace Nz
|
|||
|
||||
inline bool VertexBuffer::IsValid() const
|
||||
{
|
||||
return m_buffer && m_vertexDeclaration;
|
||||
return m_buffer.IsValid() && m_vertexDeclaration.IsValid();
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ namespace Nz
|
|||
}
|
||||
else
|
||||
{
|
||||
NazaraNotice("Received wrong token (" + String::Number(token) + " instead of " + String::Number(~peer.stateData1) + ") from client " + peer.address);
|
||||
NazaraNotice("Received wrong token (" + String::Number(token) + " instead of " + String::Number(~peer.stateData1) + ") from client " + peer.address.ToString());
|
||||
return; //< Ignore
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue