From ac98dd2752a49b8e80629a59d7243e589f44358d Mon Sep 17 00:00:00 2001 From: Mathis-Z Date: Tue, 30 May 2023 22:35:05 +0200 Subject: Fixing #1127 by making return types of auto-generated functions dynamic --- test/src/example.cpp | 5 +++++ test/src/example.h | 1 + 2 files changed, 6 insertions(+) (limited to 'test/src') diff --git a/test/src/example.cpp b/test/src/example.cpp index 6d24379..cb83dc7 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -127,6 +127,7 @@ void Example::_bind_methods() { ClassDB::bind_method(D_METHOD("test_dictionary"), &Example::test_dictionary); ClassDB::bind_method(D_METHOD("test_node_argument"), &Example::test_node_argument); ClassDB::bind_method(D_METHOD("test_string_ops"), &Example::test_string_ops); + ClassDB::bind_method(D_METHOD("test_str_utility"), &Example::test_str_utility); ClassDB::bind_method(D_METHOD("test_vector_ops"), &Example::test_vector_ops); ClassDB::bind_method(D_METHOD("test_bitfield", "flags"), &Example::test_bitfield); @@ -280,6 +281,10 @@ String Example::test_string_ops() const { return s; } +String Example::test_str_utility() const { + return UtilityFunctions::str("Hello, ", "World", "! The answer is ", 42); +} + int Example::test_vector_ops() const { PackedInt32Array arr; arr.push_back(10); diff --git a/test/src/example.h b/test/src/example.h index ebf9156..dda4230 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -114,6 +114,7 @@ public: Dictionary test_dictionary() const; Example *test_node_argument(Example *p_node) const; String test_string_ops() const; + String test_str_utility() const; int test_vector_ops() const; BitField test_bitfield(BitField flags); -- cgit v1.2.3