Skip to content

Commit

Permalink
Add #pragma once to top of headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDruide1 committed Oct 14, 2023
1 parent 06021b0 commit 1bdbbda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/al/include/Library/Execute/ExecuteTablesImpl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "Library/Execute/ExecuteOrder.h"
#include "Library/Execute/ExecuteTable.h"

Expand Down
5 changes: 0 additions & 5 deletions src/System/GameDataHolder.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @file GameDataHolder.h
* @brief Holds scenario / game data.
*/

#pragma once

#include <prim/seadSafeString.h>
Expand Down
4 changes: 4 additions & 0 deletions tools/check-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def common_newline_eof(c, path):

# Header files

def header_pragma_once(c, path):
CHECK(lambda a:a=="#pragma once", c.splitlines()[0], "Headers must start with \"#pragma once\"!", path)


# Source files

Expand All @@ -49,6 +52,7 @@ def check_source(c, path):

def check_header(c, path):
common_newline_eof(c, path)
header_pragma_once(c, path)

def check_file(file_str):
file = open(file_str, mode="r")
Expand Down

0 comments on commit 1bdbbda

Please sign in to comment.