[ox/std] Add copy constructor to String

This commit is contained in:
Gary Talent 2020-03-16 00:12:09 -05:00
parent e0a2676d54
commit 4273e72e74

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);