[ox/std] Add copy constructor to String
This commit is contained in:
parent
e0a2676d54
commit
4273e72e74
4
deps/ox/src/ox/std/string.cpp
vendored
4
deps/ox/src/ox/std/string.cpp
vendored
@ -24,6 +24,10 @@ String::String(const char *str) noexcept {
|
|||||||
*this = str;
|
*this = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String::String(String &other) noexcept {
|
||||||
|
m_buff = other.m_buff;
|
||||||
|
}
|
||||||
|
|
||||||
const String &String::operator=(const char *str) noexcept {
|
const String &String::operator=(const char *str) noexcept {
|
||||||
std::size_t strLen = ox_strlen(str) + 1;
|
std::size_t strLen = ox_strlen(str) + 1;
|
||||||
m_buff.resize(strLen + 1);
|
m_buff.resize(strLen + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user