godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.69k stars 528 forks source link

Explicitly refer to `godot` namespace in `GDREGISTER_*_CLASS()` macros #1477

Closed dsnopek closed 4 months ago

dsnopek commented 4 months ago

Currently, the GDREGISTER_*_CLASS() macros assume that user code has using namespace godot. This PR makes the macros explicitly refer to the godot namespace, so they can be used even without that.

Kehom commented 4 months ago

Just updated my code that explicitly used the ClassDB functions to use the "new" macros. Working great!

dsnopek commented 3 months ago

Cherry-picked for 4.1 in PR https://github.com/godotengine/godot-cpp/pull/1491

dsnopek commented 3 months ago

Cherry-picked for 4.2 in PR https://github.com/godotengine/godot-cpp/pull/1492