From fce3a125be965842cb2a8bb028edf95cfad1efee Mon Sep 17 00:00:00 2001 From: 2LoS Date: Sun, 26 Oct 2025 14:57:33 +0100 Subject: 'operator bool()' is marked as explicit --- dev/CompilerKit/StringKit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dev/CompilerKit/StringKit.h') diff --git a/dev/CompilerKit/StringKit.h b/dev/CompilerKit/StringKit.h index 422d163..c4efbee 100644 --- a/dev/CompilerKit/StringKit.h +++ b/dev/CompilerKit/StringKit.h @@ -56,7 +56,7 @@ class BasicString final { BasicString& operator+=(const Char rhs); BasicString& operator+=(const BasicString& rhs); - operator bool() { return m_Data && m_Data[0] != 0; } + explicit operator bool() { return m_Data && m_Data[0] != 0; } bool operator!() { return !m_Data || m_Data[0] == 0; } @@ -77,7 +77,7 @@ struct StringBuilder final { static BasicString FromInt(const char* fmt, int n); static BasicString FromBool(const char* fmt, bool n); static BasicString Format(const char* fmt, const char* from); - static BOOL Equals(const char* lhs, const char* rhs); + static Bool Equals(const char* lhs, const char* rhs); }; using BasicStringOr = ErrorOr; @@ -85,4 +85,4 @@ using BasicStringPtr = BasicString*; using BasicStringRef = Ref; } // namespace CompilerKit -#endif /* ifndef __NECTI_STRINGKIT__ */ \ No newline at end of file +#endif /* ifndef __NECTI_STRINGKIT__ */ -- cgit v1.2.3