[ox/std] Fix infinite recursing in BasicString(const char*)
This commit is contained in:
parent
4e2d7ea9dd
commit
64c74cb9c1
10
deps/ox/src/ox/std/string.hpp
vendored
10
deps/ox/src/ox/std/string.hpp
vendored
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user