[ox/std] Change ox::String::operator[](size_t) const return a reference

This commit is contained in:
Gary Talent 2025-01-21 22:43:57 -06:00
parent c36b244dd3
commit cda23ac4af

View File

@ -171,7 +171,7 @@ class BasicString {
constexpr bool operator>=(BasicString const&other) const noexcept;
constexpr char operator[](std::size_t i) const noexcept;
constexpr char const&operator[](std::size_t i) const noexcept;
constexpr char &operator[](std::size_t i) noexcept;
@ -490,7 +490,7 @@ constexpr bool BasicString<SmallStringSize_v>::operator>=(BasicString const&othe
}
template<std::size_t SmallStringSize_v>
constexpr char BasicString<SmallStringSize_v>::operator[](std::size_t i) const noexcept {
constexpr char const&BasicString<SmallStringSize_v>::operator[](std::size_t i) const noexcept {
return m_buff[i];
}