[ox/std] Fix infinite recursing in BasicString(const char*)

This commit is contained in:
Gary Talent 2022-02-20 14:40:02 -06:00
parent 4e2d7ea9dd
commit 64c74cb9c1

View File

@ -102,8 +102,6 @@ class BasicString {
BasicString &operator=(const char *str) noexcept;
BasicString &operator=(char *str) noexcept;
BasicString &operator=(char c) noexcept;
BasicString &operator=(int i) noexcept;
@ -252,7 +250,7 @@ constexpr BasicString<SmallStringSize>::BasicString(const char8_t *str) noexcept
} else {
m_buff.push_back(0);
}
*this = str;
this->operator=(str);
}
template<std::size_t SmallStringSize>
@ -282,12 +280,6 @@ BasicString<SmallStringSize> &BasicString<SmallStringSize>::operator=(const char
return *this;
}
template<std::size_t SmallStringSize>
BasicString<SmallStringSize> &BasicString<SmallStringSize>::operator=(char *str) noexcept {
*this = const_cast<const char*>(str);
return *this;
}
template<std::size_t SmallStringSize>
BasicString<SmallStringSize> &BasicString<SmallStringSize>::operator=(char c) noexcept {
char str[] = {c, 0};