mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-06 06:10:06 +03:00
Added missing namespace prefixes to GDVIRTUAL macros
(cherry picked from commit 8c5e038744)
This commit is contained in:
committed by
David Snopek
parent
2c24570997
commit
211ecf768c
@@ -97,7 +97,7 @@ def generate_virtual_version(argcount, const=False, returns=False, required=Fals
|
|||||||
|
|
||||||
sproto = str(argcount)
|
sproto = str(argcount)
|
||||||
method_info = ""
|
method_info = ""
|
||||||
method_flags = "METHOD_FLAG_VIRTUAL"
|
method_flags = "::godot::MethodFlags::METHOD_FLAG_VIRTUAL"
|
||||||
if returns:
|
if returns:
|
||||||
sproto += "R"
|
sproto += "R"
|
||||||
s = s.replace("$RET", "m_ret,")
|
s = s.replace("$RET", "m_ret,")
|
||||||
@@ -110,14 +110,14 @@ def generate_virtual_version(argcount, const=False, returns=False, required=Fals
|
|||||||
|
|
||||||
if const:
|
if const:
|
||||||
sproto += "C"
|
sproto += "C"
|
||||||
method_flags += " | METHOD_FLAG_CONST"
|
method_flags += " | ::godot::MethodFlags::METHOD_FLAG_CONST"
|
||||||
s = s.replace("$CONST", "const")
|
s = s.replace("$CONST", "const")
|
||||||
else:
|
else:
|
||||||
s = s.replace("$CONST ", "")
|
s = s.replace("$CONST ", "")
|
||||||
|
|
||||||
if required:
|
if required:
|
||||||
sproto += "_REQUIRED"
|
sproto += "_REQUIRED"
|
||||||
method_flags += " | METHOD_FLAG_VIRTUAL_REQUIRED"
|
method_flags += " | ::godot::MethodFlags::METHOD_FLAG_VIRTUAL_REQUIRED"
|
||||||
s = s.replace(
|
s = s.replace(
|
||||||
"$REQCHECK",
|
"$REQCHECK",
|
||||||
'ERR_PRINT_ONCE("Required virtual method " + get_class() + "::" + #m_name + " must be overridden before calling.");',
|
'ERR_PRINT_ONCE("Required virtual method " + get_class() + "::" + #m_name + " must be overridden before calling.");',
|
||||||
|
|||||||
Reference in New Issue
Block a user