mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Integrate .pre-commit-config.yaml
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user