From 8e5d7c926873e071fac23557c5d4081203af8926 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Wed, 10 Apr 2024 13:51:53 -0500 Subject: [PATCH] Use `GDREGISTER` defines in example (cherry picked from commit a537b4af4ded29ee715a950f47887cb5367b9825) --- README.md | 2 +- test/src/register_types.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b1162840..16f7b2d1 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; } - ClassDB::register_class(); + GDREGISTER_CLASS(Example); } ``` diff --git a/test/src/register_types.cpp b/test/src/register_types.cpp index 560dd907..5f082329 100644 --- a/test/src/register_types.cpp +++ b/test/src/register_types.cpp @@ -21,13 +21,13 @@ void initialize_example_module(ModuleInitializationLevel p_level) { return; } - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(true); - ClassDB::register_abstract_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_CLASS(ExampleRef); + GDREGISTER_CLASS(ExampleMin); + GDREGISTER_CLASS(Example); + GDREGISTER_VIRTUAL_CLASS(ExampleVirtual); + GDREGISTER_ABSTRACT_CLASS(ExampleAbstract); + GDREGISTER_CLASS(ExampleBase); + GDREGISTER_CLASS(ExampleChild); } void uninitialize_example_module(ModuleInitializationLevel p_level) {