Skip to content

Commit 4b7661a

Browse files
authored
Merge pull request #1435 from Repiteo/example-use-defines
Use `GDREGISTER` defines in example
2 parents b021245 + a537b4a commit 4b7661a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
132132
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
133133
return;
134134
}
135-
ClassDB::register_class<Example>();
135+
GDREGISTER_CLASS(Example);
136136
}
137137
```
138138

test/src/register_types.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
2121
return;
2222
}
2323

24-
ClassDB::register_class<ExampleRef>();
25-
ClassDB::register_class<ExampleMin>();
26-
ClassDB::register_class<Example>();
27-
ClassDB::register_class<ExampleVirtual>(true);
28-
ClassDB::register_abstract_class<ExampleAbstractBase>();
29-
ClassDB::register_class<ExampleConcrete>();
30-
ClassDB::register_class<ExampleBase>();
31-
ClassDB::register_class<ExampleChild>();
32-
ClassDB::register_runtime_class<ExampleRuntime>();
24+
GDREGISTER_CLASS(ExampleRef);
25+
GDREGISTER_CLASS(ExampleMin);
26+
GDREGISTER_CLASS(Example);
27+
GDREGISTER_VIRTUAL_CLASS(ExampleVirtual);
28+
GDREGISTER_ABSTRACT_CLASS(ExampleAbstractBase);
29+
GDREGISTER_CLASS(ExampleConcrete);
30+
GDREGISTER_CLASS(ExampleBase);
31+
GDREGISTER_CLASS(ExampleChild);
32+
GDREGISTER_RUNTIME_CLASS(ExampleRuntime);
3333
}
3434

3535
void uninitialize_example_module(ModuleInitializationLevel p_level) {

0 commit comments

Comments
 (0)