From 982e8ab669c7f30323d8c99945e675018b90d28e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:44:22 -0300 Subject: [PATCH] add explicit const char* overloads for gd::string --- loader/include/Geode/c++stl/string.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loader/include/Geode/c++stl/string.hpp b/loader/include/Geode/c++stl/string.hpp index 03b3681f..a3943c78 100644 --- a/loader/include/Geode/c++stl/string.hpp +++ b/loader/include/Geode/c++stl/string.hpp @@ -93,8 +93,14 @@ namespace gd { bool operator==(string const& other) const; bool operator==(std::string_view const other) const; + bool operator==(char const* other) const { + return *this == std::string_view(other); + } std::strong_ordering operator<=>(string const& other) const; std::strong_ordering operator<=>(std::string_view const other) const; + std::strong_ordering operator<=>(char const* other) const { + return *this <=> std::string_view(other); + } operator std::string() const; operator std::string_view() const;