Explorar o código

Class constants should be static

Marc Gilleron %!s(int64=2) %!d(string=hai) anos
pai
achega
f8f25980e1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      binding_generator.py

+ 1 - 1
binding_generator.py

@@ -1022,7 +1022,7 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us
         for value in class_api["constants"]:
             if "type" not in value:
                 value["type"] = "int"
-            result.append(f'\tconst {value["type"]} {value["name"]} = {value["value"]};')
+            result.append(f'\tstatic const {value["type"]} {value["name"]} = {value["value"]};')
         result.append("")
 
     if is_singleton: