diff options
author | Sadie Powell <sadie@witchery.services> | 2022-01-04 12:02:50 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-01-04 12:10:32 +0000 |
commit | 7d1047490e4380c4f02900b711c66055d29fb387 (patch) | |
tree | ff3a4b9063b9b8b6e2cf1b36c185c3ad47de99e7 /include/version.cpp | |
parent | c9f93eeaedcf3e2d211fea7799ea529d76ebaad5 (diff) |
Consistently use #pragma once across all header files.
This replaces a mixture of no include guards, ANOPE_FOO_H, and FOO_H.
Diffstat (limited to 'include/version.cpp')
-rw-r--r-- | include/version.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/version.cpp b/include/version.cpp index 02fef8975..164fdb525 100644 --- a/include/version.cpp +++ b/include/version.cpp @@ -105,8 +105,9 @@ static bool write_build_h(const std::string &buildh, const std::string &git_vers return false; } - fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << std::endl; - fd << build << std::endl; + fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << std::endl + << "#pragma once" << std::endl + << build << std::endl; if (!git_version.empty()) fd << "#define VERSION_GIT \"" << git_version << "\"" << std::endl; fd.close(); @@ -144,6 +145,7 @@ static bool write_version_h(const std::string &versionh, const std::map<std::str if (!fd.is_open()) return false; + fd << "#pragma once" << std::endl; for (std::map<std::string, std::string>::const_iterator it = versions.begin(); it != versions.end(); ++it) { fd << "#define " << it->first << " " << it->second << std::endl; |