diff --git a/src/__ConstStringCore.hpp b/src/__ConstStringCore.hpp index 1691a0f..a0e4cbd 100644 --- a/src/__ConstStringCore.hpp +++ b/src/__ConstStringCore.hpp @@ -32,6 +32,7 @@ [[nodiscard]] inline constexpr size_t Length() const noexcept { return _length; } \ \ [[nodiscard]] inline constexpr uint32_t GetHash() const noexcept { return _hash; } \ + inline constexpr bool Empty() const noexcept { return _length == 0; } \ \ constexpr std::size_t operator()(name const& s) const noexcept { return s.GetHash(); } \ inline constexpr operator uint32_t() const { return _hash; } \ @@ -39,9 +40,11 @@ inline constexpr bool operator==(const name& rhs) const { return _hash == rhs._hash; } \ inline constexpr bool operator!=(const name& rhs) const { return _hash != rhs._hash; } \ inline STDSTRINGCONSTEXPR bool operator==(const std::string& rhs) const { \ - return _hash == Hash(rhs.c_str()); } \ + return _hash == Hash(rhs.c_str()); \ + } \ inline STDSTRINGCONSTEXPR bool operator!=(const std::string& rhs) const { \ - return _hash != Hash(rhs.c_str()); } \ + return _hash != Hash(rhs.c_str()); \ + } \ inline constexpr bool operator==(const char* rhs) const { return _hash == Hash(rhs); } \ inline constexpr bool operator!=(const char* rhs) const { return _hash != Hash(rhs); } \ }; \