From 4273e72e745ba8c08e23bcd8c7f29c95621243c8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 16 Mar 2020 00:12:09 -0500 Subject: [PATCH] [ox/std] Add copy constructor to String --- deps/ox/src/ox/std/string.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/ox/src/ox/std/string.cpp b/deps/ox/src/ox/std/string.cpp index ec4918fb..98431db6 100644 --- a/deps/ox/src/ox/std/string.cpp +++ b/deps/ox/src/ox/std/string.cpp @@ -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);