From ed76ebfbafd401601ff57395190a63a5da12bb81 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 (synced from 4273e72e745ba8c08e23bcd8c7f29c95621243c8) --- src/ox/std/string.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ox/std/string.cpp b/src/ox/std/string.cpp index ec4918fbe..98431db69 100644 --- a/src/ox/std/string.cpp +++ b/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);