From 0b5cb1e186ff66891c03605d69b7e351588e168b Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <42761326+quizhizhe@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:35:51 -0800 Subject: [PATCH] Fix `mce::UUID::isEmpty()` --- LiteLoader/Header/MC/Types.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LiteLoader/Header/MC/Types.hpp b/LiteLoader/Header/MC/Types.hpp index 3d62461..be1554d 100644 --- a/LiteLoader/Header/MC/Types.hpp +++ b/LiteLoader/Header/MC/Types.hpp @@ -65,7 +65,7 @@ public: MCAPI std::string asString() const; MCAPI static UUID fromString(std::string const&); inline bool isEmpty() const{ - return a && b; + return *this == mce::UUID::EMPTY; }; MCAPI static UUID seedFromString(std::string const&); MCAPI static class mce::UUID EMPTY; @@ -73,6 +73,9 @@ public: inline operator bool() const { return !isEmpty(); } + inline bool operator==(mce::UUID &res) const { + return (this->a == res.a) && (this->b == res.b); + } }; enum class ColorPalette {