[ox/std] Add copy constructor to String

(synced from 4273e72e74)
This commit is contained in:
2020-03-16 00:12:09 -05:00
parent cad156add5
commit ed76ebfbaf
+4
View File
@@ -24,6 +24,10 @@ String::String(const char *str) noexcept {
*this = str;
}
String::String(String &other) noexcept {
m_buff = other.m_buff;
}
const String &String::operator=(const char *str) noexcept {
std::size_t strLen = ox_strlen(str) + 1;
m_buff.resize(strLen + 1);