summaryrefslogtreecommitdiffstats
path: root/test/src/example.cpp
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-06-25 09:42:55 -0500
committerGitHub <noreply@github.com>2024-06-25 09:42:55 -0500
commit7d7799b56ed7dfdae1454f246a98cf35601cc053 (patch)
tree5f6385831fb7de70386c761907d9f4eb023155f6 /test/src/example.cpp
parent90c6ea2a126a4238d87b3f9472ca16cf84e76102 (diff)
parente0d363aad8e2204fe8ca4b6937ef2ad74a7b293b (diff)
downloadredot-cpp-7d7799b56ed7dfdae1454f246a98cf35601cc053.tar.gz
Merge pull request #1504 from Repiteo/pre-commit-hooks
Replace legacy hooks with `pre-commit` Python tool
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r--test/src/example.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index a0a0da2..a941889 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -202,7 +202,7 @@ void Example::_bind_methods() {
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_string_is_fourty_two"), &Example::test_string_is_fourty_two);
+ ClassDB::bind_method(D_METHOD("test_string_is_forty_two"), &Example::test_string_is_forty_two);
ClassDB::bind_method(D_METHOD("test_string_resize"), &Example::test_string_resize);
ClassDB::bind_method(D_METHOD("test_vector_ops"), &Example::test_vector_ops);
ClassDB::bind_method(D_METHOD("test_vector_init_list"), &Example::test_vector_init_list);
@@ -299,7 +299,7 @@ bool Example::has_object_instance_binding() const {
Example::Example() :
object_instance_binding_set_by_parent_constructor(has_object_instance_binding()) {
- // Test conversion, to ensure users can use all parent calss functions at this time.
+ // Test conversion, to ensure users can use all parent class functions at this time.
// It would crash if instance binding still not be initialized.
Variant v = Variant(this);
Object *o = (Object *)v;
@@ -361,7 +361,7 @@ ExampleRef *Example::return_extended_ref() const {
}
Ref<ExampleRef> Example::extended_ref_checks(Ref<ExampleRef> p_ref) const {
- // This is therefor the prefered way of instancing and returning a refcounted object:
+ // This is therefore the preferred way of instancing and returning a refcounted object:
Ref<ExampleRef> ref;
ref.instantiate();
return ref;
@@ -410,8 +410,8 @@ String Example::test_str_utility() const {
return UtilityFunctions::str("Hello, ", "World", "! The answer is ", 42);
}
-bool Example::test_string_is_fourty_two(const String &p_string) const {
- return strcmp(p_string.utf8().ptr(), "fourty two") == 0;
+bool Example::test_string_is_forty_two(const String &p_string) const {
+ return strcmp(p_string.utf8().ptr(), "forty two") == 0;
}
String Example::test_string_resize(String p_string) const {