Merge pull request #1423 from AThousandShips/style_fix
Fix some style details in generationpull/1497/head
commit
0efc6cddbc
|
@ -805,6 +805,8 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl
|
|||
|
||||
if "return_type" in method:
|
||||
method_signature += f'{correct_type(method["return_type"])}'
|
||||
if not method_signature.endswith("*"):
|
||||
method_signature += " "
|
||||
else:
|
||||
method_signature += "void "
|
||||
|
||||
|
@ -1642,8 +1644,6 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us
|
|||
vararg = "is_vararg" in method and method["is_vararg"]
|
||||
|
||||
method_signature = "\t"
|
||||
if vararg:
|
||||
method_signature += "private: "
|
||||
method_signature += make_signature(
|
||||
class_name, method, for_header=True, use_template_get_node=use_template_get_node
|
||||
)
|
||||
|
@ -1787,7 +1787,9 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us
|
|||
False,
|
||||
)
|
||||
if return_type is not None:
|
||||
method_signature += return_type + " "
|
||||
method_signature += return_type
|
||||
if not method_signature.endswith("*"):
|
||||
method_signature += " "
|
||||
else:
|
||||
method_signature += "void "
|
||||
|
||||
|
@ -2735,7 +2737,7 @@ def correct_type(type_name, meta=None, use_alias=True):
|
|||
return f"Ref<{type_name}>"
|
||||
if type_name == "Object" or is_engine_class(type_name):
|
||||
return f"{type_name} *"
|
||||
if type_name.endswith("*"):
|
||||
if type_name.endswith("*") and not type_name.endswith("**") and not type_name.endswith(" *"):
|
||||
return f"{type_name[:-1]} *"
|
||||
return type_name
|
||||
|
||||
|
|
Loading…
Reference in New Issue