Style: Integrate #pragma once in builders/checks
This commit is contained in:
@ -14,8 +14,7 @@ def run(target, source, env):
|
||||
|
||||
g.write(
|
||||
"""/* THIS FILE IS GENERATED DO NOT EDIT */
|
||||
#ifndef GDEXTENSION_INTERFACE_DUMP_H
|
||||
#define GDEXTENSION_INTERFACE_DUMP_H
|
||||
#pragma once
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
@ -49,7 +48,5 @@ class GDExtensionInterfaceDump {
|
||||
};
|
||||
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
#endif // GDEXTENSION_INTERFACE_DUMP_H
|
||||
"""
|
||||
)
|
||||
|
||||
@ -119,10 +119,7 @@ def generate_ex_version(argcount, const=False, returns=False):
|
||||
def run(target, source, env):
|
||||
max_versions = 12
|
||||
|
||||
txt = """
|
||||
#ifndef GDEXTENSION_WRAPPERS_GEN_H
|
||||
#define GDEXTENSION_WRAPPERS_GEN_H
|
||||
"""
|
||||
txt = "#pragma once"
|
||||
|
||||
for i in range(max_versions + 1):
|
||||
txt += "\n/* Extension Wrapper " + str(i) + " Arguments */\n"
|
||||
@ -138,7 +135,5 @@ def run(target, source, env):
|
||||
txt += generate_mod_version(i, True, False)
|
||||
txt += generate_mod_version(i, True, True)
|
||||
|
||||
txt += "\n#endif\n"
|
||||
|
||||
with open(str(target[0]), "w", encoding="utf-8", newline="\n") as f:
|
||||
f.write(txt)
|
||||
|
||||
Reference in New Issue
Block a user