summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2017-03-18 15:23:28 +0100
committerKarroffel <therzog@mail.de>2017-03-18 15:23:28 +0100
commit7fa7f7b9c5d5999a5c626a77b1a9b22da6f009b9 (patch)
treeff6610df8b430d445726f7ee94072e91f80bf5e9 /include
parent80e3e74934426c9fc87906096cbd53efcc316b19 (diff)
downloadredot-cpp-7fa7f7b9c5d5999a5c626a77b1a9b22da6f009b9.tar.gz
added operator overload for string
Diffstat (limited to 'include')
-rw-r--r--include/SConstruct4
-rw-r--r--include/godot_cpp/Godot.hpp2
-rw-r--r--include/godot_cpp/core/String.cpp5
-rw-r--r--include/godot_cpp/core/String.hpp2
4 files changed, 11 insertions, 2 deletions
diff --git a/include/SConstruct b/include/SConstruct
index 1e8f7b9..158ac20 100644
--- a/include/SConstruct
+++ b/include/SConstruct
@@ -57,7 +57,9 @@ elif target == "bindings":
env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN/\''])
env.Append(CPPPATH=['.', './godot', './godot_cpp'])
- env.Append(LIBS=['godot_cpp_core', 'godot.windows.tools.64'])
+ if platform == "windows":
+ env.Append(LIBS=['godot.windows.tools.64'])
+ env.Append(LIBS=['godot_cpp_core'])
env.Append(LIBPATH=["."])
env.Append(CPPFLAGS=['-D_GD_CPP_BINDING_IMPL'])
diff --git a/include/godot_cpp/Godot.hpp b/include/godot_cpp/Godot.hpp
index c3df7e4..bacfd64 100644
--- a/include/godot_cpp/Godot.hpp
+++ b/include/godot_cpp/Godot.hpp
@@ -173,7 +173,7 @@ struct _WrappedMethod1<T, void, A0> {
(obj->*(method->f))(*arg[0]);
return v;
- }
+ }
};
diff --git a/include/godot_cpp/core/String.cpp b/include/godot_cpp/core/String.cpp
index c3c78e4..af83f2e 100644
--- a/include/godot_cpp/core/String.cpp
+++ b/include/godot_cpp/core/String.cpp
@@ -66,6 +66,11 @@ int String::length() const
return len;
}
+void String::operator =(const String &s)
+{
+ godot_string_copy_string(&_godot_string, &s._godot_string);
+}
+
bool String::operator ==(const String &s)
{
return godot_string_operator_equal(&_godot_string, &s._godot_string);
diff --git a/include/godot_cpp/core/String.hpp b/include/godot_cpp/core/String.hpp
index ec14242..00790ae 100644
--- a/include/godot_cpp/core/String.hpp
+++ b/include/godot_cpp/core/String.hpp
@@ -41,6 +41,8 @@ public:
int length() const;
+ void operator =(const String &s);
+
bool operator ==(const String &s);
bool operator !=(const String &s);