Replace all godot:: with ::godot:: - #2025
Conversation
3c9aa18 to
61dbeaa
Compare
YakoYakoYokuYoku
left a comment
There was a problem hiding this comment.
Some nits regarding example code, the rest LGTM.
61dbeaa to
32dc551
Compare
Ivorforce
left a comment
There was a problem hiding this comment.
The leading :: should only be needed if used inside macros.
While technically more precise, it's usually not done, probably to keep it looking cleaner?
In macros it makes a lot of sense though because the source namespace isn't known (only established after macro expansion) which is what caused https://github.com/Zylann/godot_voxel/actions/runs/30151875176/job/89663504724.
If you'd prefer to always use a leading :: I'll go along with it, but I personally would prefer to default to omit it.
| \ | ||
| static void *_gde_binding_create_callback(void *p_token, void *p_instance) { \ | ||
| /* Do not call memnew here, we don't want the post-initializer to be called */ \ | ||
| return new (godot::DefaultAllocator{}) m_class((GodotObject *)p_instance); \ |
There was a problem hiding this comment.
As an example, this one is needed...
| static GDExtensionInitializationLevel current_level; | ||
|
|
||
| friend class godot::GDExtensionBinding; | ||
| friend class ::godot::GDExtensionBinding; |
Yeah, personally, I'd prefer to always use the leading |
Ivorforce
left a comment
There was a problem hiding this comment.
Ok, fine by me!
Code looks good to me; thanks for the fix!
In most places, we're already using
::godot::but a few were missing it and a few were added in a recent sync's (#2014)This PR attempts to replace all
godot::with::godot::