[ox/std] Fix StringLiteral::operator= to work with DevkitARM

This commit is contained in:
2025-06-25 21:29:41 -05:00
parent 73273b6fa7
commit 21713ba945

View File

@ -30,16 +30,14 @@ class StringLiteral: public detail::BaseStringView {
constexpr explicit StringLiteral(std::nullptr_t) noexcept {} constexpr explicit StringLiteral(std::nullptr_t) noexcept {}
constexpr explicit StringLiteral(const char *str, std::size_t len) noexcept: BaseStringView(str, len) {} constexpr explicit StringLiteral(const char *str, std::size_t len) noexcept: BaseStringView{str, len} {}
OX_ALLOW_UNSAFE_BUFFERS_BEGIN OX_ALLOW_UNSAFE_BUFFERS_BEGIN
constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral(str, ox::strlen(str)) {} constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral{str, ox::strlen(str)} {}
OX_ALLOW_UNSAFE_BUFFERS_END OX_ALLOW_UNSAFE_BUFFERS_END
constexpr StringLiteral &operator=(StringLiteral const &other) noexcept { constexpr StringLiteral &operator=(StringLiteral const &other) noexcept {
if (&other != this) {
set(other.data(), other.len()); set(other.data(), other.len());
}
return *this; return *this;
} }