Identifiers containing double underscore are reserved according to the C++ standard

Rename __* to _gde_*

https://timsong-cpp.github.io/cppwp/n3337/global.names

https://en.cppreference.com/w/cpp/language/identifiers

Identifiers appearing as a token or preprocessing token (i.e., not in user-defined-string-literal like operator ""id) (since C++11) of one of the following forms are reserved:
 - identifiers with a double underscore anywhere;
 - identifiers that begin with an underscore followed by an uppercase letter;
 - in the global namespace, identifiers that begin with an underscore.
This commit is contained in:
Andy Maloney
2023-02-16 10:38:38 -05:00
parent 1bc9ca7b57
commit db2394dbe7
7 changed files with 130 additions and 130 deletions

View File

@@ -219,7 +219,7 @@ public:
// Used exclusively in the bindings to recreate the Ref Godot encapsulates in return values,
// without adding to the refcount.
inline static Ref<T> ___internal_constructor(Object *obj) {
inline static Ref<T> _gde_internal_constructor(Object *obj) {
Ref<T> r;
r.reference = (T *)obj;
return r;