Browse Source

Merge pull request #1864 from janos-ijgyarto/master

Added missing namespace prefixes to GDVIRTUAL macros
David Snopek 2 weeks ago
parent
commit
4ae2669dcd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      binding_generator.py

+ 3 - 3
binding_generator.py

@@ -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.");',