diff options
Autocommit at 25.04.2022 @ 17:12
1 files changed, 4 insertions, 2 deletions
| -rw-r--r-- | src/String/String.cpp | 6 |
diff --git a/src/String/String.cpp b/src/String/String.cpp index ee9c9df..72db76c 100644 --- a/src/String/String.cpp +++ b/src/String/String.cpp @@ -46,10 +46,12 @@ String::~String() { } String::String(String&& other) { - moveFrom(other); + str = other.str; + other.str = nullptr; + length = other.length; } -String& String::operator=(const String& other) { +String& String::operator=(String&& other) { if (this != &other) { free(); moveFrom(other); |
