summaryrefslogtreecommitdiffstats
path: root/src/core/String.cpp
diff options
context:
space:
mode:
authorDhruvMaroo <dhruvmaru007@gmail.com>2021-05-31 09:31:11 +0530
committerDhruvMaroo <dhruvmaru007@gmail.com>2021-05-31 09:31:11 +0530
commit67e2c6145c8650defb5af6ff88d805dc07fe3975 (patch)
treeef76a06a26eb4ee5ffe85d61c86ef8c870728693 /src/core/String.cpp
parentb44b98a94c564a6eeb619c476ea2a3a75e1e6297 (diff)
downloadredot-cpp-67e2c6145c8650defb5af6ff88d805dc07fe3975.tar.gz
used godot_string_new_copy to copy
Diffstat (limited to 'src/core/String.cpp')
-rw-r--r--src/core/String.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/String.cpp b/src/core/String.cpp
index 68ead4d..ac72f06 100644
--- a/src/core/String.cpp
+++ b/src/core/String.cpp
@@ -74,7 +74,7 @@ String::String(const String &other) {
}
String::String(String&& other) {
- _godot_string = other._godot_string;
+ godot::api->godot_string_new_copy(&_godot_string, &other._godot_string);
}
String::~String() {
@@ -100,7 +100,7 @@ void String::operator=(const String &s) {
void String::operator=(String&& s) {
godot::api->godot_string_destroy(&_godot_string);
- _godot_string = s._godot_string;
+ godot::api->godot_string_new_copy(&_godot_string, &s._godot_string);
}
bool String::operator==(const String &s) const {