From 55f9cb9859b58e82367e2ce2b3ea0eb8e63480fe Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Sun, 5 Apr 2020 06:58:31 -0400 Subject: [PATCH 1/6] Custom header guard check Write a check to verify that our header guards follow a consistent style. --- tools/clang-tidy-plugin/CMakeLists.txt | 1 + tools/clang-tidy-plugin/CataTidyModule.cpp | 2 + tools/clang-tidy-plugin/HeaderGuardCheck.cpp | 385 ++++++++++++++++++ tools/clang-tidy-plugin/HeaderGuardCheck.h | 26 ++ tools/clang-tidy-plugin/test/header-guard-1.h | 10 + tools/clang-tidy-plugin/test/header-guard-2.h | 8 + tools/clang-tidy-plugin/test/header-guard-3.h | 8 + .../clang-tidy-plugin/test/header-guard-4.cpp | 7 + tools/clang-tidy-plugin/test/header-guard-5.h | 9 + tools/clang-tidy-plugin/test/lit.cfg | 2 +- 10 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 tools/clang-tidy-plugin/HeaderGuardCheck.cpp create mode 100644 tools/clang-tidy-plugin/HeaderGuardCheck.h create mode 100644 tools/clang-tidy-plugin/test/header-guard-1.h create mode 100644 tools/clang-tidy-plugin/test/header-guard-2.h create mode 100644 tools/clang-tidy-plugin/test/header-guard-3.h create mode 100644 tools/clang-tidy-plugin/test/header-guard-4.cpp create mode 100644 tools/clang-tidy-plugin/test/header-guard-5.h diff --git a/tools/clang-tidy-plugin/CMakeLists.txt b/tools/clang-tidy-plugin/CMakeLists.txt index a78f9f1d50f6e..f800fc588eb0f 100644 --- a/tools/clang-tidy-plugin/CMakeLists.txt +++ b/tools/clang-tidy-plugin/CMakeLists.txt @@ -6,6 +6,7 @@ find_package(Clang REQUIRED CONFIG) add_library( CataAnalyzerPlugin MODULE CataTidyModule.cpp + HeaderGuardCheck.cpp JsonTranslationInputCheck.cpp NoLongCheck.cpp NoStaticGettextCheck.cpp diff --git a/tools/clang-tidy-plugin/CataTidyModule.cpp b/tools/clang-tidy-plugin/CataTidyModule.cpp index 441c31a4dadb5..ecfa62ce66925 100644 --- a/tools/clang-tidy-plugin/CataTidyModule.cpp +++ b/tools/clang-tidy-plugin/CataTidyModule.cpp @@ -2,6 +2,7 @@ #include "ClangTidyModule.h" #include "ClangTidyModuleRegistry.h" +#include "HeaderGuardCheck.h" #include "JsonTranslationInputCheck.h" #include "NoLongCheck.h" #include "NoStaticGettextCheck.h" @@ -26,6 +27,7 @@ class CataModule : public ClangTidyModule { public: void addCheckFactories( ClangTidyCheckFactories &CheckFactories ) override { + CheckFactories.registerCheck( "cata-header-guard" ); CheckFactories.registerCheck( "cata-json-translation-input" ); CheckFactories.registerCheck( "cata-no-long" ); CheckFactories.registerCheck( "cata-no-static-gettext" ); diff --git a/tools/clang-tidy-plugin/HeaderGuardCheck.cpp b/tools/clang-tidy-plugin/HeaderGuardCheck.cpp new file mode 100644 index 0000000000000..2a101dea7a3c5 --- /dev/null +++ b/tools/clang-tidy-plugin/HeaderGuardCheck.cpp @@ -0,0 +1,385 @@ +#include "HeaderGuardCheck.h" + +#include + +#include + +#if !defined(_MSC_VER) +#include +#include +#endif + +#if defined(_WIN32) +#include "platform_win.h" +#endif + +namespace clang +{ +namespace tidy +{ +namespace cata +{ + +CataHeaderGuardCheck::CataHeaderGuardCheck( StringRef Name, + ClangTidyContext *Context ) + : ClangTidyCheck( Name, Context ) {} + +/// \brief canonicalize a path by removing ./ and ../ components. +static std::string cleanPath( StringRef Path ) +{ + SmallString<256> Result = Path; + llvm::sys::path::remove_dots( Result, true ); + return Result.str(); +} + +static bool pathExists( const std::string &path ) +{ + struct stat buffer; + return ( stat( path.c_str(), &buffer ) == 0 ); +} + +static bool isHeaderFileName( StringRef FileName ) +{ + return FileName.contains( ".h" ); +} + +static std::string getHeaderGuard( StringRef Filename ) +{ + std::string Guard = tooling::getAbsolutePath( Filename ); + + // Look for the top-level directory + std::string TopDir = Guard; + size_t LastSlash; + bool Found = false; + while( std::string::npos != ( LastSlash = TopDir.find_last_of( "/\\" ) ) ) { + TopDir = TopDir.substr( 0, LastSlash ); + if( pathExists( TopDir + "/.travis.yml" ) ) { + Found = true; + break; + } + } + + if( !Found ) { + return {}; + } + + Guard = Guard.substr( TopDir.length() + 1 ); + + std::replace( Guard.begin(), Guard.end(), '/', '_' ); + std::replace( Guard.begin(), Guard.end(), '.', '_' ); + std::replace( Guard.begin(), Guard.end(), '-', '_' ); + + Guard = "CATA_" + Guard; + + return StringRef( Guard ).upper(); +} + +static std::string formatEndIf( StringRef HeaderGuard ) +{ + return "endif // " + HeaderGuard.str(); +} + +struct MacroInfo_ { + Token Tok; + const MacroInfo *Info; +}; + +struct IfndefInfo { + const IdentifierInfo *MacroId; + SourceLocation Loc; + SourceLocation MacroNameLoc; +}; + +struct FileInfo { + const FileEntry *Entry; + std::vector Macros; + std::vector Ifndefs; + std::map EndIfs; + SourceLocation PragmaOnce; +}; + +class HeaderGuardPPCallbacks : public PPCallbacks +{ + public: + HeaderGuardPPCallbacks( Preprocessor *PP, CataHeaderGuardCheck *Check ) + : PP( PP ), Check( Check ) {} + + std::string GetFileName( SourceLocation Loc ) { + SourceManager &SM = PP->getSourceManager(); + FileID Id = SM.getFileID( Loc ); + if( const FileEntry *Entry = SM.getFileEntryForID( Id ) ) { + return cleanPath( Entry->getName() ); + } else { + return {}; + } + } + + void FileChanged( SourceLocation Loc, FileChangeReason Reason, + SrcMgr::CharacteristicKind FileType, + FileID ) override { + if( Reason == EnterFile && FileType == SrcMgr::C_User ) { + std::string FileName = GetFileName( Loc ); + Files.insert( FileName ); + SourceManager &SM = PP->getSourceManager(); + FileID Id = SM.getFileID( Loc ); + FileInfos[FileName].Entry = SM.getFileEntryForID( Id ); + } + } + + void Ifndef( SourceLocation Loc, const Token &MacroNameTok, + const MacroDefinition &MD ) override { + if( MD ) { + return; + } + + // Record #ifndefs that succeeded. We also need the Location of the Name. + FileInfos[GetFileName( Loc )].Ifndefs.push_back( + IfndefInfo{ MacroNameTok.getIdentifierInfo(), Loc, MacroNameTok.getLocation() } ); + } + + void MacroDefined( const Token &MacroNameTok, + const MacroDirective *MD ) override { + // Record all defined macros. We store the whole token to get info on the + // name later. + SourceLocation Loc = MD->getLocation(); + FileInfos[GetFileName( Loc )].Macros.push_back( + MacroInfo_{ MacroNameTok, MD->getMacroInfo() } ); + } + + void Endif( SourceLocation Loc, SourceLocation IfLoc ) override { + // Record all #endif and the corresponding #ifs (including #ifndefs). + FileInfos[GetFileName( Loc )].EndIfs[IfLoc] = Loc; + } + + void PragmaDirective( SourceLocation Loc, PragmaIntroducerKind ) override { + const char *PragmaData = PP->getSourceManager().getCharacterData( Loc ); + static constexpr const char *PragmaOnce = "#pragma once"; + if( 0 == strncmp( PragmaData, PragmaOnce, strlen( PragmaOnce ) ) ) { + FileInfos[GetFileName( Loc )].PragmaOnce = Loc; + } + } + + void EndOfMainFile() override { + // Now that we have all this information from the preprocessor, use it! + std::unordered_set GuardlessHeaders = Files; + + for( const std::string &FileName : Files ) { + const FileInfo &Info = FileInfos[FileName]; + + if( Info.Macros.empty() || Info.Ifndefs.empty() || Info.EndIfs.empty() ) { + continue; + } + + const IfndefInfo &Ifndef = Info.Ifndefs.front(); + const MacroInfo_ &Macro = Info.Macros.front(); + StringRef CurHeaderGuard = Macro.Tok.getIdentifierInfo()->getName(); + + if( Ifndef.MacroId->getName() != CurHeaderGuard ) { + // If the #ifndef and #define don't match, then it's + // probably not a header guard we're looking at. Abort. + continue; + } + + // Look up Locations for this guard. + SourceLocation DefineLoc = Macro.Tok.getLocation(); + auto EndifIt = Info.EndIfs.find( Ifndef.Loc ); + + if( EndifIt == Info.EndIfs.end() ) { + continue; + } + + SourceLocation EndIfLoc = EndifIt->second; + + GuardlessHeaders.erase( FileName ); + + // If the macro Name is not equal to what we can compute, correct it in + // the #ifndef and #define. + std::vector FixIts; + std::string NewGuard = + checkHeaderGuardDefinition( Ifndef.MacroNameLoc, DefineLoc, FileName, + CurHeaderGuard, FixIts ); + + // Now look at the #endif. We want a comment with the header guard. Fix it + // at the slightest deviation. + checkEndifComment( EndIfLoc, NewGuard, FixIts ); + + // Bundle all fix-its into one warning. The message depends on whether we + // changed the header guard or not. + if( !FixIts.empty() ) { + if( CurHeaderGuard != NewGuard ) { + Check->diag( Ifndef.Loc, "Header guard does not follow preferred style." ) + << FixIts; + } else { + Check->diag( EndIfLoc, "#endif for a header guard should reference the " + "guard macro in a comment." ) + << FixIts; + } + } + } + + // Emit warnings for headers that are missing guards. + checkGuardlessHeaders( GuardlessHeaders ); + + // Clear all state. + Files.clear(); + FileInfos.clear(); + } + + bool wouldFixEndifComment( SourceLocation EndIf, StringRef HeaderGuard, + size_t *EndIfLenPtr = nullptr ) { + if( !EndIf.isValid() ) { + return false; + } + const char *EndIfData = PP->getSourceManager().getCharacterData( EndIf ); + // NOLINTNEXTLINE(cata-text-style) + size_t EndIfLen = std::strcspn( EndIfData, "\r\n" ); + if( EndIfLenPtr ) { + *EndIfLenPtr = EndIfLen; + } + + StringRef EndIfStr( EndIfData, EndIfLen ); + // NOLINTNEXTLINE(cata-text-style) + EndIfStr = EndIfStr.substr( EndIfStr.find_first_not_of( "#endif \t" ) ); + + // Give up if there's an escaped newline. + size_t FindEscapedNewline = EndIfStr.find_last_not_of( ' ' ); + if( FindEscapedNewline != StringRef::npos && + EndIfStr[FindEscapedNewline] == '\\' ) { + return false; + } + + return EndIfStr != "// " + HeaderGuard.str(); + } + + /// \brief Look for header guards that don't match the preferred style. Emit + /// fix-its and return the suggested header guard (or the original if no + /// change was made. + static std::string checkHeaderGuardDefinition( SourceLocation Ifndef, + SourceLocation Define, + StringRef FileName, + StringRef CurHeaderGuard, + std::vector &FixIts ) { + std::string CPPVar = getHeaderGuard( FileName ); + + if( CPPVar.empty() ) { + return CurHeaderGuard; + } + + if( Ifndef.isValid() && CurHeaderGuard != CPPVar ) { + FixIts.push_back( FixItHint::CreateReplacement( + CharSourceRange::getTokenRange( + Ifndef, Ifndef.getLocWithOffset( CurHeaderGuard.size() ) ), + CPPVar ) ); + FixIts.push_back( FixItHint::CreateReplacement( + CharSourceRange::getTokenRange( + Define, Define.getLocWithOffset( CurHeaderGuard.size() ) ), + CPPVar ) ); + return CPPVar; + } + return CurHeaderGuard; + } + + /// \brief Checks the comment after the #endif of a header guard and fixes it + /// if it doesn't match \c HeaderGuard. + void checkEndifComment( SourceLocation EndIf, StringRef HeaderGuard, + std::vector &FixIts ) { + size_t EndIfLen; + if( wouldFixEndifComment( EndIf, HeaderGuard, &EndIfLen ) ) { + FixIts.push_back( FixItHint::CreateReplacement( + CharSourceRange::getCharRange( EndIf, + EndIf.getLocWithOffset( EndIfLen ) ), + formatEndIf( HeaderGuard ) ) ); + } + } + + /// \brief Looks for files that were visited but didn't have a header guard. + /// Emits a warning with fixits suggesting adding one. + void checkGuardlessHeaders( std::unordered_set GuardlessHeaders ) { + // Look for header files that didn't have a header guard. Emit a warning and + // fix-its to add the guard. + for( const std::string &FileName : GuardlessHeaders ) { + if( !isHeaderFileName( FileName ) ) { + continue; + } + + SourceManager &SM = PP->getSourceManager(); + const FileInfo &Info = FileInfos.at( FileName ); + const FileEntry *FE = Info.Entry; + if( !FE ) { + fprintf( stderr, "No FileEntry for %s\n", FileName.c_str() ); + continue; + } + FileID FID = SM.translateFile( FE ); + SourceLocation StartLoc = SM.getLocForStartOfFile( FID ); + if( StartLoc.isInvalid() ) { + continue; + } + + std::string CPPVar = getHeaderGuard( FileName ); + if( CPPVar.empty() ) { + continue; + } + // If there's a macro with a name that follows the header guard convention + // but was not recognized by the preprocessor as a header guard there must + // be code outside of the guarded area. Emit a plain warning without + // fix-its. + bool SeenMacro = false; + for( const auto &MacroEntry : Info.Macros ) { + StringRef Name = MacroEntry.Tok.getIdentifierInfo()->getName(); + SourceLocation DefineLoc = MacroEntry.Tok.getLocation(); + if( Name == CPPVar && + SM.isWrittenInSameFile( StartLoc, DefineLoc ) ) { + Check->diag( DefineLoc, "Code/includes outside of area guarded by " + "header guard; consider moving it." ); + SeenMacro = true; + break; + } + } + + if( SeenMacro ) { + continue; + } + + SourceLocation InsertLoc = StartLoc; + + if( Info.PragmaOnce.isValid() ) { + const char *PragmaData = + PP->getSourceManager().getCharacterData( Info.PragmaOnce ); + const char *Newline = strchr( PragmaData, '\n' ); + if( Newline ) { + InsertLoc = Info.PragmaOnce.getLocWithOffset( Newline + 1 - PragmaData ); + } + } + + const char *InsertData = PP->getSourceManager().getCharacterData( InsertLoc ); + const char *Newlines = "\n\n"; + if( InsertData[0] == '\n' || InsertData[0] == '\r' ) { + Newlines = "\n"; + } + + Check->diag( InsertLoc, "Header is missing header guard." ) + << FixItHint::CreateInsertion( + InsertLoc, "#ifndef " + CPPVar + "\n#define " + CPPVar + Newlines ) + << FixItHint::CreateInsertion( + SM.getLocForEndOfFile( FID ), + "\n#" + formatEndIf( CPPVar ) + "\n" ); + } + } + private: + std::unordered_set Files; + std::unordered_map FileInfos; + + Preprocessor *PP; + CataHeaderGuardCheck *Check; +}; + +void CataHeaderGuardCheck::registerPPCallbacks( CompilerInstance &Compiler ) +{ + Compiler.getPreprocessor().addPPCallbacks( + llvm::make_unique( &Compiler.getPreprocessor(), + this ) ); +} + +} // namespace cata +} // namespace tidy +} // namespace clang diff --git a/tools/clang-tidy-plugin/HeaderGuardCheck.h b/tools/clang-tidy-plugin/HeaderGuardCheck.h new file mode 100644 index 0000000000000..e8ee6204fd992 --- /dev/null +++ b/tools/clang-tidy-plugin/HeaderGuardCheck.h @@ -0,0 +1,26 @@ +#ifndef CATA_CLANG_TIDY_PLUGIN_HEADER_GUEAD_CHECK_H +#define CATA_CLANG_TIDY_PLUGIN_HEADER_GUEAD_CHECK_H + +#include + +namespace clang +{ +namespace tidy +{ +namespace cata +{ + +/// Finds and fixes header guards. +/// Based loosely on the LLVM version. +class CataHeaderGuardCheck : public ClangTidyCheck +{ + public: + CataHeaderGuardCheck( StringRef Name, ClangTidyContext *Context ); + void registerPPCallbacks( CompilerInstance &Compiler ) override; +}; + +} // namespace cata +} // namespace tidy +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADER_GUARD_CHECK_H diff --git a/tools/clang-tidy-plugin/test/header-guard-1.h b/tools/clang-tidy-plugin/test/header-guard-1.h new file mode 100644 index 0000000000000..04038ec7f99ea --- /dev/null +++ b/tools/clang-tidy-plugin/test/header-guard-1.h @@ -0,0 +1,10 @@ +// RUN: %check_clang_tidy %s cata-header-guard %t -- -plugins=%cata_plugin -- + +#ifndef THE_WRONG_HEADER_GUARD +// CHECK-MESSAGES: warning: Header guard does not follow preferred style. [cata-header-guard] +// CHECK-FIXES: #ifndef CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_1_H_TMP_CPP +#define THE_WRONG_HEADER_GUARD +// CHECK-FIXES: #define CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_1_H_TMP_CPP + +#endif +// CHECK-FIXES: #endif // CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_1_H_TMP_CPP diff --git a/tools/clang-tidy-plugin/test/header-guard-2.h b/tools/clang-tidy-plugin/test/header-guard-2.h new file mode 100644 index 0000000000000..aa85dcc8ea151 --- /dev/null +++ b/tools/clang-tidy-plugin/test/header-guard-2.h @@ -0,0 +1,8 @@ +// RUN: %check_clang_tidy %s cata-header-guard %t -- -plugins=%cata_plugin -- + +#ifndef CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_2_H_TMP_CPP +#define CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_2_H_TMP_CPP + +#endif +// CHECK-MESSAGES: warning: #endif for a header guard should reference the guard macro in a comment. [cata-header-guard] +// CHECK-FIXES: #endif // CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_2_H_TMP_CPP diff --git a/tools/clang-tidy-plugin/test/header-guard-3.h b/tools/clang-tidy-plugin/test/header-guard-3.h new file mode 100644 index 0000000000000..9764af35614cc --- /dev/null +++ b/tools/clang-tidy-plugin/test/header-guard-3.h @@ -0,0 +1,8 @@ +// RUN: %check_clang_tidy %s cata-header-guard %t -- -plugins=%cata_plugin -- +// CHECK-MESSAGES: warning: Header is missing header guard. [cata-header-guard] +// CHECK-FIXES: #ifndef CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_3_H_TMP_CPP +// CHECK-FIXES: #define CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_3_H_TMP_CPP + +int foo(); + +// CHECK-FIXES: #endif // CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_3_H_TMP_CPP diff --git a/tools/clang-tidy-plugin/test/header-guard-4.cpp b/tools/clang-tidy-plugin/test/header-guard-4.cpp new file mode 100644 index 0000000000000..82645c309392e --- /dev/null +++ b/tools/clang-tidy-plugin/test/header-guard-4.cpp @@ -0,0 +1,7 @@ +// RUN: %check_clang_tidy %s cata-header-guard,cata-no-long %t -- -plugins=%cata_plugin -- +// Should not need a header guard because it's not a header. + +// Include another warning just to avoid the "there were no warnings in your +// test case" error. +long foo(); +// CHECK-MESSAGES: warning: Function 'foo' declared as returning 'long'. Prefer int or int64_t to long. [cata-no-long] diff --git a/tools/clang-tidy-plugin/test/header-guard-5.h b/tools/clang-tidy-plugin/test/header-guard-5.h new file mode 100644 index 0000000000000..e1e976590d1e2 --- /dev/null +++ b/tools/clang-tidy-plugin/test/header-guard-5.h @@ -0,0 +1,9 @@ +// RUN: %check_clang_tidy %s cata-header-guard %t -- -plugins=%cata_plugin -- +#pragma once +// CHECK-MESSAGES: [[@LINE]]:1: warning: Header is missing header guard. [cata-header-guard] +// CHECK-FIXES: #ifndef CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_5_H_TMP_CPP +// CHECK-FIXES: #define CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_5_H_TMP_CPP + +int foo(); + +// CHECK-FIXES: #endif // CATA_BUILD_TOOLS_CLANG_TIDY_PLUGIN_TEST_OUTPUT_HEADER_GUARD_5_H_TMP_CPP diff --git a/tools/clang-tidy-plugin/test/lit.cfg b/tools/clang-tidy-plugin/test/lit.cfg index 4ab6e913a73b3..496804316adfa 100644 --- a/tools/clang-tidy-plugin/test/lit.cfg +++ b/tools/clang-tidy-plugin/test/lit.cfg @@ -8,7 +8,7 @@ config.test_source_root = os.path.dirname(__file__) config.test_exec_root = os.path.join( config.plugin_build_root, 'test') -config.suffixes = ['.cpp'] +config.suffixes = ['.cpp', '.h'] if config.cata_check_clang_tidy: check_clang_tidy = config.cata_check_clang_tidy From a528967acdb21c0b1ea028446df457a1f55925eb Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Fri, 10 Apr 2020 12:39:55 -0400 Subject: [PATCH 2/6] Apply header guard fixes --- src/achievement.h | 6 +++--- src/action.h | 6 +++--- src/active_item_cache.h | 6 +++--- src/activity_actor.h | 6 +++--- src/activity_handlers.h | 6 +++--- src/activity_type.h | 6 +++--- src/addiction.h | 6 +++--- src/advanced_inv.h | 6 +++--- src/advanced_inv_area.h | 6 +++--- src/advanced_inv_listitem.h | 6 +++--- src/advanced_inv_pane.h | 6 +++--- src/ammo.h | 6 +++--- src/ammo_effect.h | 6 +++--- src/anatomy.h | 6 +++--- src/animation.h | 6 +++--- src/artifact.h | 6 +++--- src/assign.h | 6 +++--- src/auto_note.h | 6 +++--- src/auto_pickup.h | 6 +++--- src/avatar.h | 6 +++--- src/avatar_action.h | 6 +++--- src/ballistics.h | 6 +++--- src/basecamp.h | 6 +++--- src/behavior.h | 6 +++--- src/behavior_oracle.h | 6 +++--- src/behavior_strategy.h | 6 +++--- src/bionics.h | 6 +++--- src/bodypart.h | 6 +++--- src/bonuses.h | 6 +++--- src/calendar.h | 6 +++--- src/cata_algo.h | 6 +++--- src/cata_io.h | 6 +++--- src/cata_tiles.h | 6 +++--- src/cata_utility.h | 6 +++--- src/cata_variant.h | 6 +++--- src/catacharset.h | 6 +++--- src/cellular_automata.h | 6 +++--- src/char_validity_check.h | 6 +++--- src/character.h | 6 +++--- src/character_id.h | 6 +++--- src/character_martial_arts.h | 6 +++--- src/clone_ptr.h | 6 +++--- src/clothing_mod.h | 6 +++--- src/clzones.h | 6 +++--- src/colony.h | 6 +++--- src/color.h | 6 +++--- src/color_loader.h | 6 +++--- src/common_types.h | 6 +++--- src/compatibility.h | 6 +++--- src/computer.h | 6 +++--- src/computer_session.h | 6 +++--- src/condition.h | 6 +++--- src/construction.h | 6 +++--- src/construction_category.h | 6 +++--- src/coordinate_conversions.h | 6 +++--- src/coordinates.h | 6 +++--- src/craft_command.h | 6 +++--- src/crafting.h | 6 +++--- src/crafting_gui.h | 6 +++--- src/crash.h | 6 +++--- src/creature.h | 6 +++--- src/creature_tracker.h | 6 +++--- src/cursesdef.h | 6 +++--- src/cursesport.h | 6 +++--- src/damage.h | 6 +++--- src/debug.h | 6 +++--- src/debug_menu.h | 6 +++--- src/dependency_tree.h | 6 +++--- src/dialogue.h | 6 +++--- src/dialogue_win.h | 6 +++--- src/disease.h | 6 +++--- src/dispersion.h | 6 +++--- src/drawing_primitives.h | 6 +++--- src/editmap.h | 6 +++--- src/effect.h | 6 +++--- src/emit.h | 6 +++--- src/enum_bitset.h | 6 +++--- src/enum_conversions.h | 6 +++--- src/enum_traits.h | 6 +++--- src/enums.h | 6 +++--- src/event.h | 6 +++--- src/event_bus.h | 6 +++--- src/event_field_transformations.h | 6 +++--- src/event_statistics.h | 6 +++--- src/explosion.h | 6 +++--- src/faction.h | 6 +++--- src/faction_camp.h | 6 +++--- src/fault.h | 6 +++--- src/field.h | 6 +++--- src/field_type.h | 6 +++--- src/filesystem.h | 6 +++--- src/fire.h | 6 +++--- src/flag.h | 6 +++--- src/flat_set.h | 6 +++--- src/flood_fill.h | 6 +++--- src/font_loader.h | 6 +++--- src/fragment_cloud.h | 6 +++--- src/fungal_effects.h | 6 +++--- src/game.h | 6 +++--- src/game_constants.h | 6 +++--- src/game_inventory.h | 6 +++--- src/game_ui.h | 6 +++--- src/gamemode.h | 6 +++--- src/gamemode_defense.h | 6 +++--- src/gamemode_tutorial.h | 6 +++--- src/gates.h | 6 +++--- src/generic_factory.h | 6 +++--- src/get_version.h | 6 +++--- src/gun_mode.h | 6 +++--- src/handle_liquid.h | 6 +++--- src/harvest.h | 6 +++--- src/hash_utils.h | 6 +++--- src/help.h | 6 +++--- src/iexamine.h | 6 +++--- src/ime.h | 6 +++--- src/init.h | 6 +++--- src/input.h | 6 +++--- src/int_id.h | 6 +++--- src/inventory.h | 6 +++--- src/inventory_ui.h | 6 +++--- src/io_tags.h | 6 +++--- src/item.h | 6 +++--- src/item_action.h | 6 +++--- src/item_category.h | 6 +++--- src/item_contents.h | 6 +++--- src/item_factory.h | 6 +++--- src/item_group.h | 6 +++--- src/item_location.h | 6 +++--- src/item_search.h | 6 +++--- src/item_stack.h | 6 +++--- src/iteminfo_query.h | 6 +++--- src/itype.h | 6 +++--- src/iuse.h | 6 +++--- src/iuse_actor.h | 6 +++--- src/iuse_software.h | 6 +++--- src/iuse_software_kitten.h | 6 +++--- src/iuse_software_lightson.h | 6 +++--- src/iuse_software_minesweeper.h | 6 +++--- src/iuse_software_snake.h | 6 +++--- src/iuse_software_sokoban.h | 6 +++--- src/json.h | 6 +++--- src/kill_tracker.h | 6 +++--- src/lightmap.h | 6 +++--- src/line.h | 6 +++--- src/list.h | 6 +++--- src/live_view.h | 6 +++--- src/loading_ui.h | 6 +++--- src/lru_cache.h | 6 +++--- src/magic.h | 6 +++--- src/magic_enchantment.h | 6 +++--- src/magic_teleporter_list.h | 6 +++--- src/magic_ter_furn_transform.h | 6 +++--- src/main_menu.h | 6 +++--- src/map.h | 6 +++--- src/map_extras.h | 6 +++--- src/map_item_stack.h | 6 +++--- src/map_iterator.h | 6 +++--- src/map_memory.h | 6 +++--- src/map_selector.h | 6 +++--- src/mapbuffer.h | 6 +++--- src/mapdata.h | 6 +++--- src/mapgen.h | 6 +++--- src/mapgen_functions.h | 6 +++--- src/mapgendata.h | 6 +++--- src/mapgenformat.h | 6 +++--- src/mapsharing.h | 6 +++--- src/martialarts.h | 6 +++--- src/material.h | 6 +++--- src/math_defines.h | 6 +++--- src/mattack_actors.h | 6 +++--- src/mattack_common.h | 6 +++--- src/melee.h | 6 +++--- src/memorial_logger.h | 6 +++--- src/memory_fast.h | 6 +++--- src/messages.h | 6 +++--- src/mission.h | 6 +++--- src/mission_companion.h | 6 +++--- src/mod_manager.h | 6 +++--- src/mod_tileset.h | 6 +++--- src/monattack.h | 6 +++--- src/mondeath.h | 6 +++--- src/mondefense.h | 6 +++--- src/monexamine.h | 6 +++--- src/monfaction.h | 6 +++--- src/mongroup.h | 6 +++--- src/monster.h | 6 +++--- src/monstergenerator.h | 6 +++--- src/morale.h | 6 +++--- src/morale_types.h | 6 +++--- src/mtype.h | 6 +++--- src/mutation.h | 6 +++--- src/name.h | 6 +++--- src/npc.h | 6 +++--- src/npc_class.h | 6 +++--- src/npc_favor.h | 6 +++--- src/npctalk.h | 6 +++--- src/npctrade.h | 6 +++--- src/omdata.h | 6 +++--- src/optional.h | 6 +++--- src/options.h | 6 +++--- src/output.h | 6 +++--- src/overlay_ordering.h | 6 +++--- src/overmap.h | 6 +++--- src/overmap_connection.h | 6 +++--- src/overmap_location.h | 6 +++--- src/overmap_noise.h | 6 +++--- src/overmap_types.h | 6 +++--- src/overmap_ui.h | 6 +++--- src/overmapbuffer.h | 6 +++--- src/panels.h | 6 +++--- src/path_info.h | 6 +++--- src/pathfinding.h | 6 +++--- src/pickup.h | 6 +++--- src/pimpl.h | 6 +++--- src/pixel_minimap.h | 6 +++--- src/pixel_minimap_projectors.h | 6 +++--- src/player.h | 6 +++--- src/player_activity.h | 6 +++--- src/pldata.h | 6 +++--- src/point.h | 6 +++--- src/popup.h | 6 +++--- src/posix_time.h | 6 +++--- src/profession.h | 6 +++--- src/projectile.h | 6 +++--- src/ranged.h | 6 +++--- src/recipe.h | 6 +++--- src/recipe_dictionary.h | 6 +++--- src/recipe_groups.h | 6 +++--- src/rect_range.h | 6 +++--- src/regional_settings.h | 6 +++--- src/relic.h | 6 +++--- src/requirements.h | 6 +++--- src/ret_val.h | 6 +++--- src/rng.h | 6 +++--- src/rotatable_symbols.h | 6 +++--- src/safe_reference.h | 6 +++--- src/safemode_ui.h | 6 +++--- src/scenario.h | 6 +++--- src/scent_block.h | 6 +++--- src/scent_map.h | 6 +++--- src/scores_ui.h | 6 +++--- src/sdl_utils.h | 6 +++--- src/sdl_wrappers.h | 6 +++--- src/sdlsound.h | 6 +++--- src/sdltiles.h | 6 +++--- src/shadowcasting.h | 6 +++--- src/simple_pathfinding.h | 6 +++--- src/simplexnoise.h | 6 +++--- src/skill.h | 6 +++--- src/skill_boost.h | 6 +++--- src/sounds.h | 6 +++--- src/speech.h | 6 +++--- src/start_location.h | 6 +++--- src/stats_tracker.h | 6 +++--- src/stomach.h | 4 ++++ src/string_formatter.h | 6 +++--- src/string_id.h | 6 +++--- src/string_input_popup.h | 6 +++--- src/submap.h | 6 +++--- src/teleport.h | 6 +++--- src/text_snippets.h | 6 +++--- src/text_style_check.h | 6 +++--- src/tileray.h | 6 +++--- src/timed_event.h | 6 +++--- src/trait_group.h | 6 +++--- src/translations.h | 6 +++--- src/trap.h | 6 +++--- src/type_id.h | 6 +++--- src/ui.h | 6 +++--- src/ui_manager.h | 6 +++--- src/uistate.h | 6 +++--- src/units.h | 6 +++--- src/value_ptr.h | 6 +++--- src/veh_interact.h | 6 +++--- src/veh_type.h | 6 +++--- src/veh_utils.h | 6 +++--- src/vehicle.h | 6 +++--- src/vehicle_group.h | 6 +++--- src/vehicle_selector.h | 6 +++--- src/visitable.h | 6 +++--- src/vitamin.h | 6 +++--- src/vpart_position.h | 6 +++--- src/vpart_range.h | 6 +++--- src/wcwidth.h | 6 +++--- src/weather.h | 6 +++--- src/weather_gen.h | 6 +++--- src/weighted_list.h | 6 +++--- src/worldfactory.h | 6 +++--- tests/assertion_helpers.h | 6 +++--- tests/colony_list_test_helpers.h | 6 +++--- tests/map_helpers.h | 6 +++--- tests/options_helpers.h | 6 +++--- tests/player_helpers.h | 6 +++--- tests/test_statistics.h | 6 +++--- 294 files changed, 883 insertions(+), 879 deletions(-) mode change 100755 => 100644 src/pathfinding.h diff --git a/src/achievement.h b/src/achievement.h index dfe2d9527c40d..0e932ccc69e29 100644 --- a/src/achievement.h +++ b/src/achievement.h @@ -1,5 +1,5 @@ -#ifndef CATA_ACHIEVEMENT_H -#define CATA_ACHIEVEMENT_H +#ifndef CATA_SRC_ACHIEVEMENT_H +#define CATA_SRC_ACHIEVEMENT_H #include #include @@ -94,4 +94,4 @@ class achievements_tracker : public event_subscriber std::unordered_map, achievement_state> achievements_status_; }; -#endif // CATA_ACHIEVEMENT_H +#endif // CATA_SRC_ACHIEVEMENT_H diff --git a/src/action.h b/src/action.h index 5e188bc7f1f2b..30b6770a0fce2 100644 --- a/src/action.h +++ b/src/action.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACTION_H -#define ACTION_H +#ifndef CATA_SRC_ACTION_H +#define CATA_SRC_ACTION_H #include #include @@ -604,4 +604,4 @@ bool can_move_vertical_at( const tripoint &p, int movez ); */ bool can_examine_at( const tripoint &p ); -#endif +#endif // CATA_SRC_ACTION_H diff --git a/src/active_item_cache.h b/src/active_item_cache.h index f1163a908dc7f..2f4ad47375bca 100644 --- a/src/active_item_cache.h +++ b/src/active_item_cache.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACTIVE_ITEM_CACHE_H -#define ACTIVE_ITEM_CACHE_H +#ifndef CATA_SRC_ACTIVE_ITEM_CACHE_H +#define CATA_SRC_ACTIVE_ITEM_CACHE_H #include #include @@ -84,4 +84,4 @@ class active_item_cache void rotate_locations( int turns, const point &dim ); }; -#endif +#endif // CATA_SRC_ACTIVE_ITEM_CACHE_H diff --git a/src/activity_actor.h b/src/activity_actor.h index f30ad5e57fea9..20ad74a6c0e63 100644 --- a/src/activity_actor.h +++ b/src/activity_actor.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACTIVITY_ACTOR_H -#define ACTIVITY_ACTOR_H +#ifndef CATA_SRC_ACTIVITY_ACTOR_H +#define CATA_SRC_ACTIVITY_ACTOR_H #include #include @@ -120,4 +120,4 @@ deserialize_functions; void serialize( const cata::clone_ptr &actor, JsonOut &jsout ); void deserialize( cata::clone_ptr &actor, JsonIn &jsin ); -#endif // ACTIVITY_ACTOR_H +#endif // CATA_SRC_ACTIVITY_ACTOR_H diff --git a/src/activity_handlers.h b/src/activity_handlers.h index 8122a9a0fb978..5fc2f76233015 100644 --- a/src/activity_handlers.h +++ b/src/activity_handlers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACTIVITY_HANDLERS_H -#define ACTIVITY_HANDLERS_H +#ifndef CATA_SRC_ACTIVITY_HANDLERS_H +#define CATA_SRC_ACTIVITY_HANDLERS_H #include #include @@ -276,4 +276,4 @@ finish_functions; } // namespace activity_handlers -#endif +#endif // CATA_SRC_ACTIVITY_HANDLERS_H diff --git a/src/activity_type.h b/src/activity_type.h index 3ac801165ee94..f19b7b14db818 100644 --- a/src/activity_type.h +++ b/src/activity_type.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACTIVITY_TYPE_H -#define ACTIVITY_TYPE_H +#ifndef CATA_SRC_ACTIVITY_TYPE_H +#define CATA_SRC_ACTIVITY_TYPE_H #include @@ -85,4 +85,4 @@ class activity_type static void reset(); }; -#endif +#endif // CATA_SRC_ACTIVITY_TYPE_H diff --git a/src/addiction.h b/src/addiction.h index 5df8b337b7b70..5d496b166ba6d 100644 --- a/src/addiction.h +++ b/src/addiction.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ADDICTION_H -#define ADDICTION_H +#ifndef CATA_SRC_ADDICTION_H +#define CATA_SRC_ADDICTION_H #include @@ -29,4 +29,4 @@ add_type addiction_type( const std::string &name ); std::string addiction_text( const addiction &cur ); -#endif +#endif // CATA_SRC_ADDICTION_H diff --git a/src/advanced_inv.h b/src/advanced_inv.h index 602e76368badb..4d71c9aa48dfb 100644 --- a/src/advanced_inv.h +++ b/src/advanced_inv.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ADVANCED_INV_H -#define ADVANCED_INV_H +#ifndef CATA_SRC_ADVANCED_INV_H +#define CATA_SRC_ADVANCED_INV_H #include #include @@ -172,4 +172,4 @@ class advanced_inventory const std::string &action, int &amount ); }; -#endif +#endif // CATA_SRC_ADVANCED_INV_H diff --git a/src/advanced_inv_area.h b/src/advanced_inv_area.h index 4fb9758770094..0d285c5612bed 100644 --- a/src/advanced_inv_area.h +++ b/src/advanced_inv_area.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ADVANCED_INV_AREA_H -#define ADVANCED_INV_AREA_H +#ifndef CATA_SRC_ADVANCED_INV_AREA_H +#define CATA_SRC_ADVANCED_INV_AREA_H #include "point.h" #include "units.h" @@ -108,4 +108,4 @@ class advanced_inv_area return veh != nullptr && vstor >= 0; } }; -#endif +#endif // CATA_SRC_ADVANCED_INV_AREA_H diff --git a/src/advanced_inv_listitem.h b/src/advanced_inv_listitem.h index 0ad5865e3cbee..856d6004affd6 100644 --- a/src/advanced_inv_listitem.h +++ b/src/advanced_inv_listitem.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ADVANCED_INV_LISTITEM_H -#define ADVANCED_INV_LISTITEM_H +#ifndef CATA_SRC_ADVANCED_INV_LISTITEM_H +#define CATA_SRC_ADVANCED_INV_LISTITEM_H #include #include @@ -104,4 +104,4 @@ class advanced_inv_listitem advanced_inv_listitem( const std::list &list, int index, aim_location area, bool from_vehicle ); }; -#endif +#endif // CATA_SRC_ADVANCED_INV_LISTITEM_H diff --git a/src/advanced_inv_pane.h b/src/advanced_inv_pane.h index ef5c0d9949151..1473e8f622018 100644 --- a/src/advanced_inv_pane.h +++ b/src/advanced_inv_pane.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ADVANCED_INV_PANE_H -#define ADVANCED_INV_PANE_H +#ifndef CATA_SRC_ADVANCED_INV_PANE_H +#define CATA_SRC_ADVANCED_INV_PANE_H #include #include @@ -133,4 +133,4 @@ class advanced_inventory_pane mutable std::map> filtercache; }; -#endif +#endif // CATA_SRC_ADVANCED_INV_PANE_H diff --git a/src/ammo.h b/src/ammo.h index 173ab6ff7c88d..f159354b07730 100644 --- a/src/ammo.h +++ b/src/ammo.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AMMO_H -#define AMMO_H +#ifndef CATA_SRC_AMMO_H +#define CATA_SRC_AMMO_H #include #include @@ -31,4 +31,4 @@ class ammunition_type static void check_consistency(); }; -#endif +#endif // CATA_SRC_AMMO_H diff --git a/src/ammo_effect.h b/src/ammo_effect.h index 6e3856c3e3618..0df808e38b547 100644 --- a/src/ammo_effect.h +++ b/src/ammo_effect.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AMMO_EFFECT_H -#define AMMO_EFFECT_H +#ifndef CATA_SRC_AMMO_EFFECT_H +#define CATA_SRC_AMMO_EFFECT_H #include #include @@ -67,4 +67,4 @@ const std::vector &get_all(); extern ammo_effect_id AE_NULL; -#endif +#endif // CATA_SRC_AMMO_EFFECT_H diff --git a/src/anatomy.h b/src/anatomy.h index e086306159de7..8ae661ee32157 100644 --- a/src/anatomy.h +++ b/src/anatomy.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ANATOMY_H -#define ANATOMY_H +#ifndef CATA_SRC_ANATOMY_H +#define CATA_SRC_ANATOMY_H #include #include @@ -59,4 +59,4 @@ class anatomy extern anatomy_id human_anatomy; -#endif +#endif // CATA_SRC_ANATOMY_H diff --git a/src/animation.h b/src/animation.h index 2393650d495ed..1268fb5d8d966 100644 --- a/src/animation.h +++ b/src/animation.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ANIMATION_H -#define ANIMATION_H +#ifndef CATA_SRC_ANIMATION_H +#define CATA_SRC_ANIMATION_H #include "color.h" @@ -31,4 +31,4 @@ struct explosion_tile { nc_color color; }; -#endif \ No newline at end of file +#endif // CATA_SRC_ANIMATION_H \ No newline at end of file diff --git a/src/artifact.h b/src/artifact.h index 5269dbbfb4c9e..9a5e4818cff05 100644 --- a/src/artifact.h +++ b/src/artifact.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ARTIFACT_H -#define ARTIFACT_H +#ifndef CATA_SRC_ARTIFACT_H +#define CATA_SRC_ARTIFACT_H #include @@ -132,4 +132,4 @@ bool save_artifacts( const std::string &path ); bool check_art_charge_req( item &it ); -#endif +#endif // CATA_SRC_ARTIFACT_H diff --git a/src/assign.h b/src/assign.h index c959d991bbbab..62f0725edacdb 100644 --- a/src/assign.h +++ b/src/assign.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ASSIGN_H -#define ASSIGN_H +#ifndef CATA_SRC_ASSIGN_H +#define CATA_SRC_ASSIGN_H #include #include @@ -871,4 +871,4 @@ inline bool assign( const JsonObject &jo, const std::string &name, damage_instan return true; } -#endif +#endif // CATA_SRC_ASSIGN_H diff --git a/src/auto_note.h b/src/auto_note.h index 9c3f4282ad4be..cd444a47e4bd0 100644 --- a/src/auto_note.h +++ b/src/auto_note.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AUTO_NOTE_H -#define AUTO_NOTE_H +#ifndef CATA_SRC_AUTO_NOTE_H +#define CATA_SRC_AUTO_NOTE_H #include #include @@ -88,4 +88,4 @@ class auto_note_settings auto_notes::auto_note_settings &get_auto_notes_settings(); -#endif // AUTO_NOTE_H +#endif // CATA_SRC_AUTO_NOTE_H diff --git a/src/auto_pickup.h b/src/auto_pickup.h index dddbf2c34b184..65d8c5c105ff6 100644 --- a/src/auto_pickup.h +++ b/src/auto_pickup.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AUTO_PICKUP_H -#define AUTO_PICKUP_H +#ifndef CATA_SRC_AUTO_PICKUP_H +#define CATA_SRC_AUTO_PICKUP_H #include #include @@ -165,4 +165,4 @@ class npc_settings : public base_settings auto_pickup::player_settings &get_auto_pickup(); -#endif +#endif // CATA_SRC_AUTO_PICKUP_H diff --git a/src/avatar.h b/src/avatar.h index 98dcf917a0394..be2bde7139732 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AVATAR_H -#define AVATAR_H +#ifndef CATA_SRC_AVATAR_H +#define CATA_SRC_AVATAR_H #include #include @@ -290,4 +290,4 @@ struct points_left { std::string to_string(); }; -#endif +#endif // CATA_SRC_AVATAR_H diff --git a/src/avatar_action.h b/src/avatar_action.h index 9267c514d66fa..75c6c4816b8ad 100644 --- a/src/avatar_action.h +++ b/src/avatar_action.h @@ -1,6 +1,6 @@ #pragma once -#ifndef AVATAR_ACTION_H -#define AVATAR_ACTION_H +#ifndef CATA_SRC_AVATAR_ACTION_H +#define CATA_SRC_AVATAR_ACTION_H #include "optional.h" #include "point.h" @@ -77,4 +77,4 @@ void use_item( avatar &you, item_location &loc ); void use_item( avatar &you ); } // namespace avatar_action -#endif // !AVATAR_MOVE_H +#endif // CATA_SRC_AVATAR_ACTION_H diff --git a/src/ballistics.h b/src/ballistics.h index cfd176ac46258..b77ea40ef5c6c 100644 --- a/src/ballistics.h +++ b/src/ballistics.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BALLISTICS_H -#define BALLISTICS_H +#ifndef CATA_SRC_BALLISTICS_H +#define CATA_SRC_BALLISTICS_H class Creature; class dispersion_sources; @@ -34,4 +34,4 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri const tripoint &target_arg, const dispersion_sources &dispersion, Creature *origin = nullptr, const vehicle *in_veh = nullptr ); -#endif +#endif // CATA_SRC_BALLISTICS_H diff --git a/src/basecamp.h b/src/basecamp.h index 5b44c2ef1af85..06b28f86930c9 100644 --- a/src/basecamp.h +++ b/src/basecamp.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BASECAMP_H -#define BASECAMP_H +#ifndef CATA_SRC_BASECAMP_H +#define CATA_SRC_BASECAMP_H #include #include @@ -380,4 +380,4 @@ class basecamp_action_components std::unique_ptr map_; // Used for by-radio crafting }; -#endif +#endif // CATA_SRC_BASECAMP_H diff --git a/src/behavior.h b/src/behavior.h index 7bd486b548abc..d6aa2f460ce61 100644 --- a/src/behavior.h +++ b/src/behavior.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BEHAVIOR_H -#define BEHAVIOR_H +#ifndef CATA_SRC_BEHAVIOR_H +#define CATA_SRC_BEHAVIOR_H #include #include @@ -90,4 +90,4 @@ void check_consistency(); } // namespace behavior -#endif +#endif // CATA_SRC_BEHAVIOR_H diff --git a/src/behavior_oracle.h b/src/behavior_oracle.h index e63528b92fd0f..8f35266a64fef 100644 --- a/src/behavior_oracle.h +++ b/src/behavior_oracle.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BEHAVIOR_ORACLE_H -#define BEHAVIOR_ORACLE_H +#ifndef CATA_SRC_BEHAVIOR_ORACLE_H +#define CATA_SRC_BEHAVIOR_ORACLE_H #include #include @@ -49,4 +49,4 @@ class character_oracle_t : public oracle_t extern std::unordered_map> predicate_map; } // namespace behavior -#endif +#endif // CATA_SRC_BEHAVIOR_ORACLE_H diff --git a/src/behavior_strategy.h b/src/behavior_strategy.h index 587367dddb7b8..b1b2ea376d2e1 100644 --- a/src/behavior_strategy.h +++ b/src/behavior_strategy.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BEHAVIOR_STRATEGY_H -#define BEHAVIOR_STRATEGY_H +#ifndef CATA_SRC_BEHAVIOR_STRATEGY_H +#define CATA_SRC_BEHAVIOR_STRATEGY_H #include #include @@ -45,4 +45,4 @@ extern std::unordered_map strategy_map; } // namespace behavior -#endif +#endif // CATA_SRC_BEHAVIOR_STRATEGY_H diff --git a/src/bionics.h b/src/bionics.h index 8df7196e9e5de..a8fa3425b8ba2 100644 --- a/src/bionics.h +++ b/src/bionics.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BIONICS_H -#define BIONICS_H +#ifndef CATA_SRC_BIONICS_H +#define CATA_SRC_BIONICS_H #include #include @@ -213,4 +213,4 @@ int bionic_manip_cos( float adjusted_skill, int bionic_difficulty ); std::vector bionics_cancelling_trait( const std::vector &bios, const trait_id &tid ); -#endif +#endif // CATA_SRC_BIONICS_H diff --git a/src/bodypart.h b/src/bodypart.h index 897df0af49c8e..38035fc0b14a8 100644 --- a/src/bodypart.h +++ b/src/bodypart.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BODYPART_H -#define BODYPART_H +#ifndef CATA_SRC_BODYPART_H +#define CATA_SRC_BODYPART_H #include #include @@ -238,4 +238,4 @@ std::string get_body_part_id( body_part bp ); /** Returns the matching body_part token from the corresponding body_part string. */ body_part get_body_part_token( const std::string &id ); -#endif +#endif // CATA_SRC_BODYPART_H diff --git a/src/bonuses.h b/src/bonuses.h index ccf1b1a54fb0e..ef6b7d2631f18 100644 --- a/src/bonuses.h +++ b/src/bonuses.h @@ -1,6 +1,6 @@ #pragma once -#ifndef BONUSES_H -#define BONUSES_H +#ifndef CATA_SRC_BONUSES_H +#define CATA_SRC_BONUSES_H #include #include @@ -89,4 +89,4 @@ class bonus_container bonus_map bonuses_mult; }; -#endif +#endif // CATA_SRC_BONUSES_H diff --git a/src/calendar.h b/src/calendar.h index 40e6a01ce8f10..9221563618531 100644 --- a/src/calendar.h +++ b/src/calendar.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CALENDAR_H -#define CALENDAR_H +#ifndef CATA_SRC_CALENDAR_H +#define CATA_SRC_CALENDAR_H #include #include @@ -567,4 +567,4 @@ enum class weekdays : int { weekdays day_of_week( const time_point &p ); -#endif +#endif // CATA_SRC_CALENDAR_H diff --git a/src/cata_algo.h b/src/cata_algo.h index 2987c03c7106b..0bcf8c13a0e29 100644 --- a/src/cata_algo.h +++ b/src/cata_algo.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_ALGO_H -#define CATA_ALGO_H +#ifndef CATA_SRC_CATA_ALGO_H +#define CATA_SRC_CATA_ALGO_H #include #include @@ -122,4 +122,4 @@ std::vector> find_cycles( const std::unordered_map #include @@ -468,4 +468,4 @@ class JsonArrayOutputArchive } // namespace io -#endif +#endif // CATA_SRC_CATA_IO_H diff --git a/src/cata_tiles.h b/src/cata_tiles.h index 87daca1def42e..3e4cb40dc0c14 100644 --- a/src/cata_tiles.h +++ b/src/cata_tiles.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_TILES_H -#define CATA_TILES_H +#ifndef CATA_SRC_CATA_TILES_H +#define CATA_SRC_CATA_TILES_H #include #include @@ -582,4 +582,4 @@ class cata_tiles std::string memory_map_mode = "color_pixel_sepia"; }; -#endif +#endif // CATA_SRC_CATA_TILES_H diff --git a/src/cata_utility.h b/src/cata_utility.h index 103934f3ef346..8a3005f70c84a 100644 --- a/src/cata_utility.h +++ b/src/cata_utility.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_UTILITY_H -#define CATA_UTILITY_H +#ifndef CATA_SRC_CATA_UTILITY_H +#define CATA_SRC_CATA_UTILITY_H #include #include @@ -529,4 +529,4 @@ class on_out_of_scope } }; -#endif // CAT_UTILITY_H +#endif // CATA_SRC_CATA_UTILITY_H diff --git a/src/cata_variant.h b/src/cata_variant.h index 31b5dd7f26747..5806ea90a4a9b 100644 --- a/src/cata_variant.h +++ b/src/cata_variant.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_VARIANT_H -#define CATA_VARIANT_H +#ifndef CATA_SRC_CATA_VARIANT_H +#define CATA_SRC_CATA_VARIANT_H #include #include @@ -349,4 +349,4 @@ struct hash { } // namespace std -#endif // CATA_VARIANT_H +#endif // CATA_SRC_CATA_VARIANT_H diff --git a/src/catacharset.h b/src/catacharset.h index d2c2c0aceb6e6..f9e16d715c5cb 100644 --- a/src/catacharset.h +++ b/src/catacharset.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATACHARSET_H -#define CATACHARSET_H +#ifndef CATA_SRC_CATACHARSET_H +#define CATA_SRC_CATACHARSET_H #include #include @@ -176,4 +176,4 @@ class utf8_wrapper void init_utf8_wrapper(); }; -#endif +#endif // CATA_SRC_CATACHARSET_H diff --git a/src/cellular_automata.h b/src/cellular_automata.h index da8f0bab14ce4..15b65cf30c0ca 100644 --- a/src/cellular_automata.h +++ b/src/cellular_automata.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CELLULAR_AUTOMATA_H -#define CELLULAR_AUTOMATA_H +#ifndef CATA_SRC_CELLULAR_AUTOMATA_H +#define CATA_SRC_CELLULAR_AUTOMATA_H #include @@ -107,4 +107,4 @@ inline std::vector> generate_cellular_automaton( const int widt } } // namespace CellularAutomata -#endif +#endif // CATA_SRC_CELLULAR_AUTOMATA_H diff --git a/src/char_validity_check.h b/src/char_validity_check.h index b2b4bf652a76d..c43d04f970d0b 100644 --- a/src/char_validity_check.h +++ b/src/char_validity_check.h @@ -1,7 +1,7 @@ #pragma once -#ifndef CHAR_VALIDITY_CHECK_H -#define CHAR_VALIDITY_CHECK_H +#ifndef CATA_SRC_CHAR_VALIDITY_CHECK_H +#define CATA_SRC_CHAR_VALIDITY_CHECK_H bool is_char_allowed( int ch ); -#endif +#endif // CATA_SRC_CHAR_VALIDITY_CHECK_H diff --git a/src/character.h b/src/character.h index f000620ac385d..88922958c7bd7 100644 --- a/src/character.h +++ b/src/character.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CHARACTER_H -#define CHARACTER_H +#ifndef CATA_SRC_CHARACTER_H +#define CATA_SRC_CHARACTER_H #include #include @@ -2075,4 +2075,4 @@ struct enum_traits { }; /**Get translated name of a stat*/ std::string get_stat_name( Character::stat Stat ); -#endif +#endif // CATA_SRC_CHARACTER_H diff --git a/src/character_id.h b/src/character_id.h index c5a5083a69708..cf35519de073d 100644 --- a/src/character_id.h +++ b/src/character_id.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_CHARACTER_ID_H -#define CATA_CHARACTER_ID_H +#ifndef CATA_SRC_CHARACTER_ID_H +#define CATA_SRC_CHARACTER_ID_H #include #include @@ -55,4 +55,4 @@ inline std::ostream &operator<<( std::ostream &o, character_id id ) return o << id.get_value(); } -#endif // CATA_CHARACTER_ID_H +#endif // CATA_SRC_CHARACTER_ID_H diff --git a/src/character_martial_arts.h b/src/character_martial_arts.h index e835e51251e7e..7ba9dbd213d27 100644 --- a/src/character_martial_arts.h +++ b/src/character_martial_arts.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CHARACTER_MARTIAL_ARTS_H -#define CHARACTER_MARTIAL_ARTS_H +#ifndef CATA_SRC_CHARACTER_MARTIAL_ARTS_H +#define CATA_SRC_CHARACTER_MARTIAL_ARTS_H #include #include @@ -104,4 +104,4 @@ class character_martial_arts std::string selected_style_name( const Character &owner ) const; }; -#endif // !CHARACTER_MARTIAL_ARTS_H +#endif // CATA_SRC_CHARACTER_MARTIAL_ARTS_H diff --git a/src/clone_ptr.h b/src/clone_ptr.h index 34a9d7eef64db..d042c5c3c6c7b 100644 --- a/src/clone_ptr.h +++ b/src/clone_ptr.h @@ -1,5 +1,5 @@ -#ifndef CATA_CLONE_PTR_H -#define CATA_CLONE_PTR_H +#ifndef CATA_SRC_CLONE_PTR_H +#define CATA_SRC_CLONE_PTR_H #include @@ -62,4 +62,4 @@ class clone_ptr } // namespace cata -#endif // CATA_CLONE_PTR_H +#endif // CATA_SRC_CLONE_PTR_H diff --git a/src/clothing_mod.h b/src/clothing_mod.h index 577712d240b0c..39c1fa1f2592c 100644 --- a/src/clothing_mod.h +++ b/src/clothing_mod.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CLOTHING_MOD_H -#define CLOTHING_MOD_H +#ifndef CATA_SRC_CLOTHING_MOD_H +#define CATA_SRC_CLOTHING_MOD_H #include #include @@ -82,4 +82,4 @@ std::string string_from_clothing_mod_type( clothing_mod_type type ); } // namespace clothing_mods -#endif +#endif // CATA_SRC_CLOTHING_MOD_H diff --git a/src/clzones.h b/src/clzones.h index 27c89c88a5504..2ca66fd5166dc 100644 --- a/src/clzones.h +++ b/src/clzones.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CLZONES_H -#define CLZONES_H +#ifndef CATA_SRC_CLZONES_H +#define CATA_SRC_CLZONES_H #include #include @@ -439,4 +439,4 @@ class zone_manager void deserialize( JsonIn &jsin ); }; -#endif +#endif // CATA_SRC_CLZONES_H diff --git a/src/colony.h b/src/colony.h index ac42e79e04497..f335258958c0d 100644 --- a/src/colony.h +++ b/src/colony.h @@ -21,8 +21,8 @@ // 3. This notice may not be removed or altered from any source distribution. #pragma once -#ifndef COLONY_H -#define COLONY_H +#ifndef CATA_SRC_COLONY_H +#define CATA_SRC_COLONY_H // Compiler-specific defines used by colony: #define COLONY_CONSTEXPR @@ -3514,4 +3514,4 @@ inline void swap( colony #include @@ -504,4 +504,4 @@ std::string get_note_string_from_color( const nc_color &color ); nc_color get_note_color( const std::string ¬e_id ); std::list> get_note_color_names(); -#endif +#endif // CATA_SRC_COLOR_H diff --git a/src/color_loader.h b/src/color_loader.h index 9099f6b9ab59e..9ab9530a793c7 100644 --- a/src/color_loader.h +++ b/src/color_loader.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COLOR_LOADER_H -#define COLOR_LOADER_H +#ifndef CATA_SRC_COLOR_LOADER_H +#define CATA_SRC_COLOR_LOADER_H #include #include @@ -83,4 +83,4 @@ class color_loader } }; -#endif +#endif // CATA_SRC_COLOR_LOADER_H diff --git a/src/common_types.h b/src/common_types.h index f57a57bd0592d..3b1c0fadc2ba1 100644 --- a/src/common_types.h +++ b/src/common_types.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COMMON_TYPES_H -#define COMMON_TYPES_H +#ifndef CATA_SRC_COMMON_TYPES_H +#define CATA_SRC_COMMON_TYPES_H #include #include @@ -46,4 +46,4 @@ struct numeric_interval { } }; -#endif // COMMON_TYPES_Hs +#endif // CATA_SRC_COMMON_TYPES_H diff --git a/src/compatibility.h b/src/compatibility.h index bbc6bac12cb6a..df641bfb9e1ab 100644 --- a/src/compatibility.h +++ b/src/compatibility.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_COMPATIBILITY_H -#define CATA_COMPATIBILITY_H +#ifndef CATA_SRC_COMPATIBILITY_H +#define CATA_SRC_COMPATIBILITY_H //-------------------------------------------------------------------------------------------------- // HACK: @@ -135,4 +135,4 @@ inline void std::advance( I iter, int num ) } #endif //CATA_NO_ADVANCE -#endif //CATA_COMPATIBILITY_H +#endif // CATA_SRC_COMPATIBILITY_H diff --git a/src/computer.h b/src/computer.h index 59a92f598b941..109fed3349c80 100644 --- a/src/computer.h +++ b/src/computer.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COMPUTER_H -#define COMPUTER_H +#ifndef CATA_SRC_COMPUTER_H +#define CATA_SRC_COMPUTER_H #include #include @@ -148,4 +148,4 @@ class computer void remove_option( computer_action action ); }; -#endif +#endif // CATA_SRC_COMPUTER_H diff --git a/src/computer_session.h b/src/computer_session.h index a12eac97e3c7f..ac12ae5a6e517 100644 --- a/src/computer_session.h +++ b/src/computer_session.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COMPUTER_SESSION_H -#define COMPUTER_SESSION_H +#ifndef CATA_SRC_COMPUTER_SESSION_H +#define CATA_SRC_COMPUTER_SESSION_H #include #include @@ -142,4 +142,4 @@ class computer_session computer_failure_functions; }; -#endif +#endif // CATA_SRC_COMPUTER_SESSION_H diff --git a/src/condition.h b/src/condition.h index c965380dc8fe4..baa2b77058eef 100644 --- a/src/condition.h +++ b/src/condition.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CONDITION_H -#define CONDITION_H +#ifndef CATA_SRC_CONDITION_H +#define CATA_SRC_CONDITION_H #include #include @@ -152,4 +152,4 @@ extern template void read_condition( const JsonO std::function &condition, bool default_val ); #endif -#endif +#endif // CATA_SRC_CONDITION_H diff --git a/src/construction.h b/src/construction.h index 62da0ed1a8fe8..bb76af1d0141a 100644 --- a/src/construction.h +++ b/src/construction.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CONSTRUCTION_H -#define CONSTRUCTION_H +#ifndef CATA_SRC_CONSTRUCTION_H +#define CATA_SRC_CONSTRUCTION_H #include #include @@ -126,4 +126,4 @@ void finalize_constructions(); void get_build_reqs_for_furn_ter_ids( const std::pair, std::map> &changed_ids, build_reqs &total_reqs ); -#endif +#endif // CATA_SRC_CONSTRUCTION_H diff --git a/src/construction_category.h b/src/construction_category.h index d5d4c194d76df..fcd45d6afe57a 100644 --- a/src/construction_category.h +++ b/src/construction_category.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CONSTRUCTION_CATEGORY_H -#define CONSTRUCTION_CATEGORY_H +#ifndef CATA_SRC_CONSTRUCTION_CATEGORY_H +#define CATA_SRC_CONSTRUCTION_CATEGORY_H #include #include @@ -36,4 +36,4 @@ const std::vector &get_all(); } // namespace construction_categories -#endif +#endif // CATA_SRC_CONSTRUCTION_CATEGORY_H diff --git a/src/coordinate_conversions.h b/src/coordinate_conversions.h index 472fa8823a6cc..33d8061aa35b7 100644 --- a/src/coordinate_conversions.h +++ b/src/coordinate_conversions.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COORDINATE_CONVERSIONS_H -#define COORDINATE_CONVERSIONS_H +#ifndef CATA_SRC_COORDINATE_CONVERSIONS_H +#define CATA_SRC_COORDINATE_CONVERSIONS_H #include "point.h" @@ -225,4 +225,4 @@ inline point ms_to_omt_remain( point &p ) // overmap terrain to map segment. tripoint omt_to_seg_copy( const tripoint &p ); -#endif +#endif // CATA_SRC_COORDINATE_CONVERSIONS_H diff --git a/src/coordinates.h b/src/coordinates.h index 9122fc6572f27..b8f09429a6ce4 100644 --- a/src/coordinates.h +++ b/src/coordinates.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COORDINATES_H -#define COORDINATES_H +#ifndef CATA_SRC_COORDINATES_H +#define CATA_SRC_COORDINATES_H #include @@ -94,4 +94,4 @@ struct real_coords { return point( abs_om.x * subs_in_om * tiles_in_sub, abs_om.y * subs_in_om * tiles_in_sub ); } }; -#endif +#endif // CATA_SRC_COORDINATES_H diff --git a/src/craft_command.h b/src/craft_command.h index 3b29189f076f6..17f345394dd3c 100644 --- a/src/craft_command.h +++ b/src/craft_command.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CRAFT_COMMAND_H -#define CRAFT_COMMAND_H +#ifndef CATA_SRC_CRAFT_COMMAND_H +#define CATA_SRC_CRAFT_COMMAND_H #include #include @@ -118,4 +118,4 @@ class craft_command const std::vector> &missing_tools ); }; -#endif +#endif // CATA_SRC_CRAFT_COMMAND_H diff --git a/src/crafting.h b/src/crafting.h index aabf76860ab03..70a0652e17dc6 100644 --- a/src/crafting.h +++ b/src/crafting.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CRAFTING_H -#define CRAFTING_H +#ifndef CATA_SRC_CRAFTING_H +#define CATA_SRC_CRAFTING_H #include @@ -23,4 +23,4 @@ void remove_ammo( item &dis_item, player &p ); // same as above but for each item in the list void remove_ammo( std::list &dis_items, player &p ); -#endif +#endif // CATA_SRC_CRAFTING_H diff --git a/src/crafting_gui.h b/src/crafting_gui.h index 8abee778a7581..a7e087b85e9a8 100644 --- a/src/crafting_gui.h +++ b/src/crafting_gui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CRAFTING_GUI_H -#define CRAFTING_GUI_H +#ifndef CATA_SRC_CRAFTING_GUI_H +#define CATA_SRC_CRAFTING_GUI_H class recipe; class JsonObject; @@ -10,4 +10,4 @@ const recipe *select_crafting_recipe( int &batch_size ); void load_recipe_category( const JsonObject &jsobj ); void reset_recipe_categories(); -#endif // CRAFT_GUI_H +#endif // CATA_SRC_CRAFTING_GUI_H diff --git a/src/crash.h b/src/crash.h index 773dabc027a66..20941c066bff3 100644 --- a/src/crash.h +++ b/src/crash.h @@ -1,8 +1,8 @@ #pragma once -#ifndef CRASH_H -#define CRASH_H +#ifndef CATA_SRC_CRASH_H +#define CATA_SRC_CRASH_H // Initialize crash handlers for windows void init_crash_handlers(); -#endif +#endif // CATA_SRC_CRASH_H diff --git a/src/creature.h b/src/creature.h index b598b825db883..22a87ead8df5e 100644 --- a/src/creature.h +++ b/src/creature.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CREATURE_H -#define CREATURE_H +#ifndef CATA_SRC_CREATURE_H +#define CATA_SRC_CREATURE_H #include #include @@ -840,4 +840,4 @@ class Creature int pain; }; -#endif +#endif // CATA_SRC_CREATURE_H diff --git a/src/creature_tracker.h b/src/creature_tracker.h index 38b2879ebd297..936aea37ade56 100644 --- a/src/creature_tracker.h +++ b/src/creature_tracker.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CREATURE_TRACKER_H -#define CREATURE_TRACKER_H +#ifndef CATA_SRC_CREATURE_TRACKER_H +#define CATA_SRC_CREATURE_TRACKER_H #include #include @@ -98,4 +98,4 @@ class Creature_tracker void remove_from_location_map( const monster &critter ); }; -#endif +#endif // CATA_SRC_CREATURE_TRACKER_H diff --git a/src/cursesdef.h b/src/cursesdef.h index 8d3070a3956aa..75fb370a23841 100644 --- a/src/cursesdef.h +++ b/src/cursesdef.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CURSESDEF_H -#define CURSESDEF_H +#ifndef CATA_SRC_CURSESDEF_H +#define CATA_SRC_CURSESDEF_H #include #include @@ -135,4 +135,4 @@ int getcurx( const window &win ); int getcury( const window &win ); } // namespace catacurses -#endif +#endif // CATA_SRC_CURSESDEF_H diff --git a/src/cursesport.h b/src/cursesport.h index 9b1cd1c13cf4c..c024657aeeaa0 100644 --- a/src/cursesport.h +++ b/src/cursesport.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATACURSE_H -#define CATACURSE_H +#ifndef CATA_SRC_CURSESPORT_H +#define CATA_SRC_CURSESPORT_H #include #if defined(TILES) || defined(_WIN32) @@ -87,5 +87,5 @@ bool handle_resize( int w, int h ); int get_scaling_factor(); #endif -#endif +#endif // CATA_SRC_CURSESPORT_H diff --git a/src/damage.h b/src/damage.h index c5b5c277ed430..6302bd3eed6ca 100644 --- a/src/damage.h +++ b/src/damage.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DAMAGE_H -#define DAMAGE_H +#ifndef CATA_SRC_DAMAGE_H +#define CATA_SRC_DAMAGE_H #include #include @@ -130,4 +130,4 @@ resistances load_resistances_instance( const JsonObject &jo ); // Handles some shorthands std::array load_damage_array( const JsonObject &jo ); -#endif +#endif // CATA_SRC_DAMAGE_H diff --git a/src/debug.h b/src/debug.h index 6078257df87d2..79a7028858358 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DEBUG_H -#define DEBUG_H +#ifndef CATA_SRC_DEBUG_H +#define CATA_SRC_DEBUG_H #include "string_formatter.h" @@ -203,4 +203,4 @@ void debug_write_backtrace( std::ostream &out ); #endif // vim:tw=72:sw=4:fdm=marker:fdl=0: -#endif +#endif // CATA_SRC_DEBUG_H diff --git a/src/debug_menu.h b/src/debug_menu.h index 6b0c3158d4a97..25cb7c20020c9 100644 --- a/src/debug_menu.h +++ b/src/debug_menu.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DEBUG_MENU_H -#define DEBUG_MENU_H +#ifndef CATA_SRC_DEBUG_MENU_H +#define CATA_SRC_DEBUG_MENU_H struct tripoint; @@ -32,4 +32,4 @@ void debug(); } // namespace debug_menu -#endif // DEBUG_MENU_H +#endif // CATA_SRC_DEBUG_MENU_H diff --git a/src/dependency_tree.h b/src/dependency_tree.h index 56d6aa9e52698..99fba3bb109d2 100644 --- a/src/dependency_tree.h +++ b/src/dependency_tree.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DEPENDENCY_TREE_H -#define DEPENDENCY_TREE_H +#ifndef CATA_SRC_DEPENDENCY_TREE_H +#define CATA_SRC_DEPENDENCY_TREE_H #include #include @@ -93,4 +93,4 @@ class dependency_tree }; -#endif +#endif // CATA_SRC_DEPENDENCY_TREE_H diff --git a/src/dialogue.h b/src/dialogue.h index 12838e4d74150..14a9073b8de90 100644 --- a/src/dialogue.h +++ b/src/dialogue.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DIALOGUE_H -#define DIALOGUE_H +#ifndef CATA_SRC_DIALOGUE_H +#define CATA_SRC_DIALOGUE_H #include #include @@ -436,4 +436,4 @@ class json_talk_topic void unload_talk_topics(); void load_talk_topic( const JsonObject &jo ); -#endif +#endif // CATA_SRC_DIALOGUE_H diff --git a/src/dialogue_win.h b/src/dialogue_win.h index 403202d414772..0638fcfb0ff3a 100644 --- a/src/dialogue_win.h +++ b/src/dialogue_win.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DIALOGUE_WIN_H -#define DIALOGUE_WIN_H +#ifndef CATA_SRC_DIALOGUE_WIN_H +#define CATA_SRC_DIALOGUE_WIN_H #include #include @@ -50,5 +50,5 @@ class dialogue_window std::string npc_name; }; -#endif +#endif // CATA_SRC_DIALOGUE_WIN_H diff --git a/src/disease.h b/src/disease.h index 3be3d07c725ec..3f8cb934779d2 100644 --- a/src/disease.h +++ b/src/disease.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DISEASE_H -#define DISEASE_H +#ifndef CATA_SRC_DISEASE_H +#define CATA_SRC_DISEASE_H #include #include @@ -34,5 +34,5 @@ class disease_type efftype_id symptoms; }; -#endif +#endif // CATA_SRC_DISEASE_H diff --git a/src/dispersion.h b/src/dispersion.h index ea83ca39e60e3..0b5872b1758d4 100644 --- a/src/dispersion.h +++ b/src/dispersion.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DISPERSION_H -#define DISPERSION_H +#ifndef CATA_SRC_DISPERSION_H +#define CATA_SRC_DISPERSION_H #include #include @@ -30,4 +30,4 @@ class dispersion_sources friend std::ostream &operator<<( std::ostream &stream, const dispersion_sources &sources ); }; -#endif +#endif // CATA_SRC_DISPERSION_H diff --git a/src/drawing_primitives.h b/src/drawing_primitives.h index 279716cc34ac1..840c65364ff68 100644 --- a/src/drawing_primitives.h +++ b/src/drawing_primitives.h @@ -1,6 +1,6 @@ #pragma once -#ifndef DRAWING_PRIMITIVES_H -#define DRAWING_PRIMITIVES_H +#ifndef CATA_SRC_DRAWING_PRIMITIVES_H +#define CATA_SRC_DRAWING_PRIMITIVES_H #include @@ -17,4 +17,4 @@ void draw_circle( std::functionset, const rl_vec2d &p, do void draw_circle( std::functionset, const point &p, int rad ); -#endif +#endif // CATA_SRC_DRAWING_PRIMITIVES_H diff --git a/src/editmap.h b/src/editmap.h index 86f03117eea2d..a0640958835b7 100644 --- a/src/editmap.h +++ b/src/editmap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef EDITMAP_H -#define EDITMAP_H +#ifndef CATA_SRC_EDITMAP_H +#define CATA_SRC_EDITMAP_H #include #include @@ -98,4 +98,4 @@ class editmap ~editmap(); }; -#endif +#endif // CATA_SRC_EDITMAP_H diff --git a/src/effect.h b/src/effect.h index 35dc88582d74f..eebaad84cc062 100644 --- a/src/effect.h +++ b/src/effect.h @@ -1,6 +1,6 @@ #pragma once -#ifndef EFFECT_H -#define EFFECT_H +#ifndef CATA_SRC_EFFECT_H +#define CATA_SRC_EFFECT_H #include #include @@ -303,4 +303,4 @@ class effects_map : public { }; -#endif +#endif // CATA_SRC_EFFECT_H diff --git a/src/emit.h b/src/emit.h index 52a226b2b6747..1fc1842a6f9e7 100644 --- a/src/emit.h +++ b/src/emit.h @@ -1,6 +1,6 @@ #pragma once -#ifndef EMIT_H -#define EMIT_H +#ifndef CATA_SRC_EMIT_H +#define CATA_SRC_EMIT_H #include #include @@ -71,4 +71,4 @@ class emit std::string field_name; }; -#endif +#endif // CATA_SRC_EMIT_H diff --git a/src/enum_bitset.h b/src/enum_bitset.h index 50aa6fbbc7c0f..ca2cb95849834 100644 --- a/src/enum_bitset.h +++ b/src/enum_bitset.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ENUM_BITSET_H -#define ENUM_BITSET_H +#ifndef CATA_SRC_ENUM_BITSET_H +#define CATA_SRC_ENUM_BITSET_H #include #include @@ -79,4 +79,4 @@ class enum_bitset std::bitset::size()> bits; }; -#endif // ENUM_BITSET_H +#endif // CATA_SRC_ENUM_BITSET_H diff --git a/src/enum_conversions.h b/src/enum_conversions.h index 253cc8969efa7..774225c4300de 100644 --- a/src/enum_conversions.h +++ b/src/enum_conversions.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_ENUM_CONVERSIONS_H -#define CATA_ENUM_CONVERSIONS_H +#ifndef CATA_SRC_ENUM_CONVERSIONS_H +#define CATA_SRC_ENUM_CONVERSIONS_H #include @@ -84,4 +84,4 @@ E string_to_enum( const std::string &data ) /*@}*/ } // namespace io -#endif // CATA_ENUM_CONVERSIONS_H +#endif // CATA_SRC_ENUM_CONVERSIONS_H diff --git a/src/enum_traits.h b/src/enum_traits.h index 2cb3af1e20212..7695bd182ba4e 100644 --- a/src/enum_traits.h +++ b/src/enum_traits.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_ENUM_TRAITS_H -#define CATA_ENUM_TRAITS_H +#ifndef CATA_SRC_ENUM_TRAITS_H +#define CATA_SRC_ENUM_TRAITS_H template struct enum_traits; @@ -19,4 +19,4 @@ struct has_enum_traits : std::false_type {}; template struct has_enum_traits> : std::true_type {}; -#endif // CATA_ENUM_TRAITS_H +#endif // CATA_SRC_ENUM_TRAITS_H diff --git a/src/enums.h b/src/enums.h index e75c6a8b1deec..b33114cfeaee2 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ENUMS_H -#define ENUMS_H +#ifndef CATA_SRC_ENUMS_H +#define CATA_SRC_ENUMS_H template struct enum_traits; @@ -282,4 +282,4 @@ struct game_message_params { game_message_flags flags; }; -#endif +#endif // CATA_SRC_ENUMS_H diff --git a/src/event.h b/src/event.h index 40a8515d4d659..e5a42030cffe9 100644 --- a/src/event.h +++ b/src/event.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_EVENT_H -#define CATA_EVENT_H +#ifndef CATA_SRC_EVENT_H +#define CATA_SRC_EVENT_H #include #include @@ -620,4 +620,4 @@ struct make_event_helper> { } // namespace cata -#endif // CATA_EVENT_H +#endif // CATA_SRC_EVENT_H diff --git a/src/event_bus.h b/src/event_bus.h index dfc9a681ae21a..f90234d629ed8 100644 --- a/src/event_bus.h +++ b/src/event_bus.h @@ -1,6 +1,6 @@ #pragma once -#ifndef EVENT_BUS_H -#define EVENT_BUS_H +#ifndef CATA_SRC_EVENT_BUS_H +#define CATA_SRC_EVENT_BUS_H #include #include @@ -43,4 +43,4 @@ class event_bus std::vector subscribers; }; -#endif // EVENT_BUS_H +#endif // CATA_SRC_EVENT_BUS_H diff --git a/src/event_field_transformations.h b/src/event_field_transformations.h index c51b3a68bbf5d..55b1f3d4a8cd9 100644 --- a/src/event_field_transformations.h +++ b/src/event_field_transformations.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_EVENT_FIELD_TRANSFORMATIONS_H -#define CATA_EVENT_FIELD_TRANSFORMATIONS_H +#ifndef CATA_SRC_EVENT_FIELD_TRANSFORMATIONS_H +#define CATA_SRC_EVENT_FIELD_TRANSFORMATIONS_H #include #include @@ -11,4 +11,4 @@ using EventFieldTransformation = std::vector( * )( const cata_variant & ); extern const std::unordered_map event_field_transformations; -#endif +#endif // CATA_SRC_EVENT_FIELD_TRANSFORMATIONS_H diff --git a/src/event_statistics.h b/src/event_statistics.h index e8ae67c6aa59a..1a93759e18816 100644 --- a/src/event_statistics.h +++ b/src/event_statistics.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_EVENT_STATISTICS_H -#define CATA_EVENT_STATISTICS_H +#ifndef CATA_SRC_EVENT_STATISTICS_H +#define CATA_SRC_EVENT_STATISTICS_H #include #include @@ -103,4 +103,4 @@ class score string_id stat_; }; -#endif // CATA_EVENT_STATISTICS_H +#endif // CATA_SRC_EVENT_STATISTICS_H diff --git a/src/explosion.h b/src/explosion.h index 8a92a4ff09c67..c24d5f2087051 100644 --- a/src/explosion.h +++ b/src/explosion.h @@ -1,6 +1,6 @@ #pragma once -#ifndef EXPLOSION_H -#define EXPLOSION_H +#ifndef CATA_SRC_EXPLOSION_H +#define CATA_SRC_EXPLOSION_H #include #include @@ -85,4 +85,4 @@ void draw_custom_explosion( const tripoint &p, const std::map #include @@ -137,4 +137,4 @@ class faction_manager faction *get( const faction_id &id, bool complain = true ); }; -#endif +#endif // CATA_SRC_FACTION_H diff --git a/src/faction_camp.h b/src/faction_camp.h index 2f9c56c053ae9..be2f5049caa9f 100644 --- a/src/faction_camp.h +++ b/src/faction_camp.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FACTION_CAMP_H -#define FACTION_CAMP_H +#ifndef CATA_SRC_FACTION_CAMP_H +#define CATA_SRC_FACTION_CAMP_H #include #include @@ -53,4 +53,4 @@ std::vector> om_building_region( const tripoint /// Returns the x and y coordinates of ( omt_tar - omt_pos ), clamped to [-1, 1] point om_simple_dir( const tripoint &omt_pos, const tripoint &omt_tar ); } // namespace talk_function -#endif +#endif // CATA_SRC_FACTION_CAMP_H diff --git a/src/fault.h b/src/fault.h index 0dbec2f9a7c08..70cbfe47cb731 100644 --- a/src/fault.h +++ b/src/fault.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FAULT_H -#define FAULT_H +#ifndef CATA_SRC_FAULT_H +#define CATA_SRC_FAULT_H #include #include @@ -82,4 +82,4 @@ class fault std::set flags; }; -#endif +#endif // CATA_SRC_FAULT_H diff --git a/src/field.h b/src/field.h index 7b4222babe560..441fa29dd167a 100644 --- a/src/field.h +++ b/src/field.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FIELD_H -#define FIELD_H +#ifndef CATA_SRC_FIELD_H +#define CATA_SRC_FIELD_H #include #include @@ -200,4 +200,4 @@ class field field_type_id _displayed_field_type; }; -#endif +#endif // CATA_SRC_FIELD_H diff --git a/src/field_type.h b/src/field_type.h index 763920508ff61..b2a91eb605fa2 100644 --- a/src/field_type.h +++ b/src/field_type.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FIELD_TYPE_H -#define FIELD_TYPE_H +#ifndef CATA_SRC_FIELD_TYPE_H +#define CATA_SRC_FIELD_TYPE_H #include #include @@ -319,4 +319,4 @@ extern field_type_id fd_null, fd_tindalos_rift ; -#endif +#endif // CATA_SRC_FIELD_TYPE_H diff --git a/src/filesystem.h b/src/filesystem.h index 7e0d146126a45..45c9d382844c9 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_FILE_SYSTEM_H -#define CATA_FILE_SYSTEM_H +#ifndef CATA_SRC_FILESYSTEM_H +#define CATA_SRC_FILESYSTEM_H #include #include @@ -60,4 +60,4 @@ bool copy_file( const std::string &source_path, const std::string &dest_path ); */ std::string ensure_valid_file_name( const std::string &file_name ); -#endif //CATA_FILE_SYSTEM_H +#endif // CATA_SRC_FILESYSTEM_H diff --git a/src/fire.h b/src/fire.h index ea919a4bd4b31..5f4b481c72968 100644 --- a/src/fire.h +++ b/src/fire.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FIRE_H -#define FIRE_H +#ifndef CATA_SRC_FIRE_H +#define CATA_SRC_FIRE_H #include "units.h" @@ -56,4 +56,4 @@ struct mat_burn_data { float burn = 0.0f; }; -#endif +#endif // CATA_SRC_FIRE_H diff --git a/src/flag.h b/src/flag.h index 19b6fc2c03442..e3d6d6515fcb6 100644 --- a/src/flag.h +++ b/src/flag.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FLAG_H -#define FLAG_H +#ifndef CATA_SRC_FLAG_H +#define CATA_SRC_FLAG_H #include #include @@ -71,4 +71,4 @@ class json_flag static void reset(); }; -#endif +#endif // CATA_SRC_FLAG_H diff --git a/src/flat_set.h b/src/flat_set.h index 55806ed969c68..33a593dc99ef4 100644 --- a/src/flat_set.h +++ b/src/flat_set.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_FLAT_SET -#define CATA_FLAT_SET +#ifndef CATA_SRC_FLAT_SET_H +#define CATA_SRC_FLAT_SET_H #include #include @@ -216,4 +216,4 @@ class flat_set : private Compare, Data } // namespace cata -#endif // CATA_FLAT_SET +#endif // CATA_SRC_FLAT_SET_H diff --git a/src/flood_fill.h b/src/flood_fill.h index 856e87fbac08e..595266242754f 100644 --- a/src/flood_fill.h +++ b/src/flood_fill.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FLOOD_FILL_H -#define FLOOD_FILL_H +#ifndef CATA_SRC_FLOOD_FILL_H +#define CATA_SRC_FLOOD_FILL_H #include #include @@ -52,4 +52,4 @@ std::vector point_flood_fill_4_connected( const point &starting_point, } } // namespace ff -#endif +#endif // CATA_SRC_FLOOD_FILL_H diff --git a/src/font_loader.h b/src/font_loader.h index 817b28f804cbf..7ed514ad99993 100644 --- a/src/font_loader.h +++ b/src/font_loader.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FONT_LOADER_H -#define FONT_LOADER_H +#ifndef CATA_SRC_FONT_LOADER_H +#define CATA_SRC_FONT_LOADER_H #include #include @@ -99,4 +99,4 @@ class font_loader } }; -#endif +#endif // CATA_SRC_FONT_LOADER_H diff --git a/src/fragment_cloud.h b/src/fragment_cloud.h index 1d43dc2401ca8..ad29d18923605 100644 --- a/src/fragment_cloud.h +++ b/src/fragment_cloud.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FRAGMENT_CLOUD_H -#define FRAGMENT_CLOUD_H +#ifndef CATA_SRC_FRAGMENT_CLOUD_H +#define CATA_SRC_FRAGMENT_CLOUD_H enum class quadrant; /* @@ -30,4 +30,4 @@ fragment_cloud accumulate_fragment_cloud( const fragment_cloud &cumulative_cloud const fragment_cloud ¤t_cloud, const int &distance ); -#endif /* FRAGMENT_CLOUD_H */ +#endif // CATA_SRC_FRAGMENT_CLOUD_H diff --git a/src/fungal_effects.h b/src/fungal_effects.h index 27eb8ad22db0f..13887d6b9abae 100644 --- a/src/fungal_effects.h +++ b/src/fungal_effects.h @@ -1,6 +1,6 @@ #pragma once -#ifndef FUNGAL_EFFECTS_H -#define FUNGAL_EFFECTS_H +#ifndef CATA_SRC_FUNGAL_EFFECTS_H +#define CATA_SRC_FUNGAL_EFFECTS_H struct tripoint; class map; @@ -27,4 +27,4 @@ class fungal_effects void spread_fungus_one_tile( const tripoint &p, int growth ); }; -#endif +#endif // CATA_SRC_FUNGAL_EFFECTS_H diff --git a/src/game.h b/src/game.h index fe5733b5561eb..8859f54c0cbb5 100644 --- a/src/game.h +++ b/src/game.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAME_H -#define GAME_H +#ifndef CATA_SRC_GAME_H +#define CATA_SRC_GAME_H #include #include @@ -1081,4 +1081,4 @@ int get_heat_radiation( const tripoint &location, bool direct ); // Returns temperature modifier from hot air fields of given location int get_convection_temperature( const tripoint &location ); -#endif +#endif // CATA_SRC_GAME_H diff --git a/src/game_constants.h b/src/game_constants.h index 6bdcb9bc4eec0..2f23b17083772 100644 --- a/src/game_constants.h +++ b/src/game_constants.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAME_CONSTANTS_H -#define GAME_CONSTANTS_H +#ifndef CATA_SRC_GAME_CONSTANTS_H +#define CATA_SRC_GAME_CONSTANTS_H #include "units.h" @@ -181,4 +181,4 @@ constexpr float very_obese = 35.0f; constexpr float morbidly_obese = 40.0f; } // namespace character_weight_category -#endif +#endif // CATA_SRC_GAME_CONSTANTS_H diff --git a/src/game_inventory.h b/src/game_inventory.h index ce5e52b07ad2c..7b8654cc79461 100644 --- a/src/game_inventory.h +++ b/src/game_inventory.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAME_INVENTORY_H -#define GAME_INVENTORY_H +#ifndef CATA_SRC_GAME_INVENTORY_H +#define CATA_SRC_GAME_INVENTORY_H #include #include @@ -118,4 +118,4 @@ item_location sterilize_cbm( player &p ); } // namespace game_menus -#endif // GAME_INVENTORY_H +#endif // CATA_SRC_GAME_INVENTORY_H diff --git a/src/game_ui.h b/src/game_ui.h index a61f6508905ee..07b6e2cc34c04 100644 --- a/src/game_ui.h +++ b/src/game_ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAME_UI_H -#define GAME_UI_H +#ifndef CATA_SRC_GAME_UI_H +#define CATA_SRC_GAME_UI_H namespace game_ui { @@ -15,4 +15,4 @@ void from_map_font_dimension( int &w, int &h ); void to_overmap_font_dimension( int &w, int &h ); void reinitialize_framebuffer(); -#endif // GAME_UI_H +#endif // CATA_SRC_GAME_UI_H diff --git a/src/gamemode.h b/src/gamemode.h index fcd21b7c41b1e..a1d37c2b1f7e9 100644 --- a/src/gamemode.h +++ b/src/gamemode.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAMEMODE_H -#define GAMEMODE_H +#ifndef CATA_SRC_GAMEMODE_H +#define CATA_SRC_GAMEMODE_H #include #include @@ -34,4 +34,4 @@ struct special_game { }; -#endif // GAMEMODE_H +#endif // CATA_SRC_GAMEMODE_H diff --git a/src/gamemode_defense.h b/src/gamemode_defense.h index a7ee32945906c..20232fb614743 100644 --- a/src/gamemode_defense.h +++ b/src/gamemode_defense.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAMEMODE_DEFENSE_H -#define GAMEMODE_DEFENSE_H +#ifndef CATA_SRC_GAMEMODE_DEFENSE_H +#define CATA_SRC_GAMEMODE_DEFENSE_H #include #include @@ -131,4 +131,4 @@ struct defense_game : public special_game { overmap_special_id defloc_special; }; -#endif // GAMEMODE_DEFENSE_H +#endif // CATA_SRC_GAMEMODE_DEFENSE_H diff --git a/src/gamemode_tutorial.h b/src/gamemode_tutorial.h index ddb3e3ed690a6..2e1646d939ac0 100644 --- a/src/gamemode_tutorial.h +++ b/src/gamemode_tutorial.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GAMEMODE_TUTORIAL_H -#define GAMEMODE_TUTORIAL_H +#ifndef CATA_SRC_GAMEMODE_TUTORIAL_H +#define CATA_SRC_GAMEMODE_TUTORIAL_H #include #include @@ -72,4 +72,4 @@ struct tutorial_game : public special_game { std::map tutorials_seen; }; -#endif // GAMEMODE_TUTORIAL_H +#endif // CATA_SRC_GAMEMODE_TUTORIAL_H diff --git a/src/gates.h b/src/gates.h index 477212d5c84ee..ee1496549f978 100644 --- a/src/gates.h +++ b/src/gates.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GATES_H -#define GATES_H +#ifndef CATA_SRC_GATES_H +#define CATA_SRC_GATES_H #include @@ -35,4 +35,4 @@ void close_door( map &m, Character &who, const tripoint &closep ); } // namespace doors -#endif +#endif // CATA_SRC_GATES_H diff --git a/src/generic_factory.h b/src/generic_factory.h index 196e4cd5a2e05..a6883545ffca4 100644 --- a/src/generic_factory.h +++ b/src/generic_factory.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GENERIC_FACTORY_H -#define GENERIC_FACTORY_H +#ifndef CATA_SRC_GENERIC_FACTORY_H +#define CATA_SRC_GENERIC_FACTORY_H #include #include @@ -986,4 +986,4 @@ inline bool legacy_volume_reader( const JsonObject &jo, const std::string &membe return true; } -#endif +#endif // CATA_SRC_GENERIC_FACTORY_H diff --git a/src/get_version.h b/src/get_version.h index 4e043fdb61c3f..99ce07f168252 100644 --- a/src/get_version.h +++ b/src/get_version.h @@ -1,5 +1,5 @@ #pragma once -#ifndef GET_VERSION_H -#define GET_VERSION_H +#ifndef CATA_SRC_GET_VERSION_H +#define CATA_SRC_GET_VERSION_H const char *getVersionString(); -#endif +#endif // CATA_SRC_GET_VERSION_H diff --git a/src/gun_mode.h b/src/gun_mode.h index ef12689238041..f802ece21297e 100644 --- a/src/gun_mode.h +++ b/src/gun_mode.h @@ -1,6 +1,6 @@ #pragma once -#ifndef GUN_MODE_H -#define GUN_MODE_H +#ifndef CATA_SRC_GUN_MODE_H +#define CATA_SRC_GUN_MODE_H #include #include @@ -61,4 +61,4 @@ class gun_mode } }; -#endif +#endif // CATA_SRC_GUN_MODE_H diff --git a/src/handle_liquid.h b/src/handle_liquid.h index cd7bb94cb28cd..36230171de057 100644 --- a/src/handle_liquid.h +++ b/src/handle_liquid.h @@ -1,6 +1,6 @@ #pragma once -#ifndef HANDLE_LIQUID_H -#define HANDLE_LIQUID_H +#ifndef CATA_SRC_HANDLE_LIQUID_H +#define CATA_SRC_HANDLE_LIQUID_H #include "item_location.h" #include "item_stack.h" @@ -112,4 +112,4 @@ bool handle_liquid( item &liquid, item *source = nullptr, int radius = 0, const monster *source_mon = nullptr ); } // namespace liquid_handler -#endif +#endif // CATA_SRC_HANDLE_LIQUID_H diff --git a/src/harvest.h b/src/harvest.h index 704c75c503da1..ab6e442125acf 100644 --- a/src/harvest.h +++ b/src/harvest.h @@ -1,6 +1,6 @@ #pragma once -#ifndef HARVEST_H -#define HARVEST_H +#ifndef CATA_SRC_HARVEST_H +#define CATA_SRC_HARVEST_H #include #include @@ -92,4 +92,4 @@ class harvest_list void finalize(); }; -#endif +#endif // CATA_SRC_HARVEST_H diff --git a/src/hash_utils.h b/src/hash_utils.h index 98aba822cccec..55b48a4dabadd 100644 --- a/src/hash_utils.h +++ b/src/hash_utils.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_TUPLE_HASH_H -#define CATA_TUPLE_HASH_H +#ifndef CATA_SRC_HASH_UTILS_H +#define CATA_SRC_HASH_UTILS_H #include @@ -88,4 +88,4 @@ struct range_hash { } // namespace cata -#endif // CATA_TUPLE_HASH_H +#endif // CATA_SRC_HASH_UTILS_H diff --git a/src/help.h b/src/help.h index 7bd85bcd53e3d..e2a1a856d7995 100644 --- a/src/help.h +++ b/src/help.h @@ -1,6 +1,6 @@ #pragma once -#ifndef HELP_H -#define HELP_H +#ifndef CATA_SRC_HELP_H +#define CATA_SRC_HELP_H #include #include @@ -34,4 +34,4 @@ help &get_help(); std::string get_hint(); -#endif +#endif // CATA_SRC_HELP_H diff --git a/src/iexamine.h b/src/iexamine.h index 54a723da5e499..4f8f2ef6acecc 100644 --- a/src/iexamine.h +++ b/src/iexamine.h @@ -1,6 +1,6 @@ #pragma once -#ifndef IEXAMINE_H -#define IEXAMINE_H +#ifndef CATA_SRC_IEXAMINE_H +#define CATA_SRC_IEXAMINE_H #include #include @@ -140,4 +140,4 @@ void practice_survival_while_foraging( player *p ); using iexamine_function = void ( * )( player &, const tripoint & ); iexamine_function iexamine_function_from_string( const std::string &function_name ); -#endif +#endif // CATA_SRC_IEXAMINE_H diff --git a/src/ime.h b/src/ime.h index 9e6325886c051..c6daf0032aac5 100644 --- a/src/ime.h +++ b/src/ime.h @@ -1,6 +1,6 @@ #pragma once -#ifndef IME_H -#define IME_H +#ifndef CATA_SRC_IME_H +#define CATA_SRC_IME_H /** * Enable or disable IME for text/keyboard input @@ -26,4 +26,4 @@ class ime_sentry bool previously_enabled; }; -#endif +#endif // CATA_SRC_IME_H diff --git a/src/init.h b/src/init.h index f0893cb690868..62502b16c5dc3 100644 --- a/src/init.h +++ b/src/init.h @@ -1,6 +1,6 @@ #pragma once -#ifndef INIT_H -#define INIT_H +#ifndef CATA_SRC_INIT_H +#define CATA_SRC_INIT_H #include #include @@ -163,4 +163,4 @@ class DynamicDataLoader } }; -#endif +#endif // CATA_SRC_INIT_H diff --git a/src/input.h b/src/input.h index a20b4b5a7d56b..858487b773089 100644 --- a/src/input.h +++ b/src/input.h @@ -1,6 +1,6 @@ #pragma once -#ifndef INPUT_H -#define INPUT_H +#ifndef CATA_SRC_INPUT_H +#define CATA_SRC_INPUT_H #include #include @@ -742,4 +742,4 @@ bool gamepad_available(); // rotate a delta direction clockwise void rotate_direction_cw( int &dx, int &dy ); -#endif +#endif // CATA_SRC_INPUT_H diff --git a/src/int_id.h b/src/int_id.h index d332c87abe586..9dde61fcbdff1 100644 --- a/src/int_id.h +++ b/src/int_id.h @@ -1,6 +1,6 @@ #pragma once -#ifndef INT_ID_H -#define INT_ID_H +#ifndef CATA_SRC_INT_ID_H +#define CATA_SRC_INT_ID_H #include #include @@ -128,4 +128,4 @@ struct hash< int_id > { }; } // namespace std -#endif +#endif // CATA_SRC_INT_ID_H diff --git a/src/inventory.h b/src/inventory.h index 60ab6d47997d7..a7aed98076f42 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -1,6 +1,6 @@ #pragma once -#ifndef INVENTORY_H -#define INVENTORY_H +#ifndef CATA_SRC_INVENTORY_H +#define CATA_SRC_INVENTORY_H #include #include @@ -247,4 +247,4 @@ class inventory : public visitable mutable itype_bin binned_items; }; -#endif +#endif // CATA_SRC_INVENTORY_H diff --git a/src/inventory_ui.h b/src/inventory_ui.h index 331f4e2d21a2f..8a2c7c9080de1 100644 --- a/src/inventory_ui.h +++ b/src/inventory_ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef INVENTORY_UI_H -#define INVENTORY_UI_H +#ifndef CATA_SRC_INVENTORY_UI_H +#define CATA_SRC_INVENTORY_UI_H #include #include @@ -703,4 +703,4 @@ class inventory_drop_selector : public inventory_multiselector size_t max_chosen_count; }; -#endif +#endif // CATA_SRC_INVENTORY_UI_H diff --git a/src/io_tags.h b/src/io_tags.h index e278089c262df..c101f65cce407 100644 --- a/src/io_tags.h +++ b/src/io_tags.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_IO_TAGS_H -#define CATA_IO_TAGS_H +#ifndef CATA_SRC_IO_TAGS_H +#define CATA_SRC_IO_TAGS_H namespace io { @@ -28,4 +28,4 @@ struct object_archive_tag { } // namespace io -#endif // CATA_IO_TAGS_H +#endif // CATA_SRC_IO_TAGS_H diff --git a/src/item.h b/src/item.h index b0768fd122aac..bebf429e1f0dd 100644 --- a/src/item.h +++ b/src/item.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_H -#define ITEM_H +#ifndef CATA_SRC_ITEM_H +#define CATA_SRC_ITEM_H #include #include @@ -2258,4 +2258,4 @@ inline bool is_crafting_component( const item &component ) !component.is_filthy(); } -#endif +#endif // CATA_SRC_ITEM_H diff --git a/src/item_action.h b/src/item_action.h index fa966dd74590d..b1df3cc60822c 100644 --- a/src/item_action.h +++ b/src/item_action.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_ACTION_H -#define ITEM_ACTION_H +#ifndef CATA_SRC_ITEM_ACTION_H +#define CATA_SRC_ITEM_ACTION_H #include #include @@ -58,4 +58,4 @@ class item_action_generator void check_consistency() const; }; -#endif +#endif // CATA_SRC_ITEM_ACTION_H diff --git a/src/item_category.h b/src/item_category.h index 206d57953ec44..302e34b99b684 100644 --- a/src/item_category.h +++ b/src/item_category.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_CATEGORY_H -#define ITEM_CATEGORY_H +#ifndef CATA_SRC_ITEM_CATEGORY_H +#define CATA_SRC_ITEM_CATEGORY_H #include #include @@ -82,5 +82,5 @@ class item_category void load( const JsonObject &jo, const std::string & ); }; -#endif +#endif // CATA_SRC_ITEM_CATEGORY_H diff --git a/src/item_contents.h b/src/item_contents.h index 90a2f8b35d41b..c1a3a944b7259 100644 --- a/src/item_contents.h +++ b/src/item_contents.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_CONTENTS_H -#define ITEM_CONTENTS_H +#ifndef CATA_SRC_ITEM_CONTENTS_H +#define CATA_SRC_ITEM_CONTENTS_H #include #include @@ -103,4 +103,4 @@ class item_contents std::list items; }; -#endif +#endif // CATA_SRC_ITEM_CONTENTS_H diff --git a/src/item_factory.h b/src/item_factory.h index 6cc189925a700..73cb19a10333e 100644 --- a/src/item_factory.h +++ b/src/item_factory.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_FACTORY_H -#define ITEM_FACTORY_H +#ifndef CATA_SRC_ITEM_FACTORY_H +#define CATA_SRC_ITEM_FACTORY_H #include #include @@ -369,4 +369,4 @@ class Item_factory std::set repair_actions; }; -#endif +#endif // CATA_SRC_ITEM_FACTORY_H diff --git a/src/item_group.h b/src/item_group.h index 066849040f4e4..1badea4caa7bc 100644 --- a/src/item_group.h +++ b/src/item_group.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_GROUP_H -#define ITEM_GROUP_H +#ifndef CATA_SRC_ITEM_GROUP_H +#define CATA_SRC_ITEM_GROUP_H #include #include @@ -310,4 +310,4 @@ class Item_group : public Item_spawn_data prop_list items; }; -#endif +#endif // CATA_SRC_ITEM_GROUP_H diff --git a/src/item_location.h b/src/item_location.h index 3dee2a76aee53..9e36e12a8f7fc 100644 --- a/src/item_location.h +++ b/src/item_location.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_LOCATION_H -#define ITEM_LOCATION_H +#ifndef CATA_SRC_ITEM_LOCATION_H +#define CATA_SRC_ITEM_LOCATION_H #include #include @@ -91,4 +91,4 @@ class item_location std::shared_ptr ptr; }; -#endif +#endif // CATA_SRC_ITEM_LOCATION_H diff --git a/src/item_search.h b/src/item_search.h index f7da1b005c8c5..0a2e5cd1f216e 100644 --- a/src/item_search.h +++ b/src/item_search.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_SEARCH_H -#define ITEM_SEARCH_H +#ifndef CATA_SRC_ITEM_SEARCH_H +#define CATA_SRC_ITEM_SEARCH_H #include #include @@ -96,4 +96,4 @@ std::function item_filter_from_string( const std::string & */ std::function basic_item_filter( std::string filter ); -#endif +#endif // CATA_SRC_ITEM_SEARCH_H diff --git a/src/item_stack.h b/src/item_stack.h index 58da76cbf0c60..b8df981669fd7 100644 --- a/src/item_stack.h +++ b/src/item_stack.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEM_STACK_H -#define ITEM_STACK_H +#ifndef CATA_SRC_ITEM_STACK_H +#define CATA_SRC_ITEM_STACK_H #include @@ -73,4 +73,4 @@ class item_stack const item *stacks_with( const item &it ) const; }; -#endif +#endif // CATA_SRC_ITEM_STACK_H diff --git a/src/iteminfo_query.h b/src/iteminfo_query.h index 3fd69441d76b8..8c00866b8ba70 100644 --- a/src/iteminfo_query.h +++ b/src/iteminfo_query.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITEMINFO_QUERY_H -#define ITEMINFO_QUERY_H +#ifndef CATA_SRC_ITEMINFO_QUERY_H +#define CATA_SRC_ITEMINFO_QUERY_H #include #include @@ -253,4 +253,4 @@ class iteminfo_query : public iteminfo_query_base static const iteminfo_query anyflags; }; -#endif +#endif // CATA_SRC_ITEMINFO_QUERY_H diff --git a/src/itype.h b/src/itype.h index 0a68b560addfa..556123f76eaed 100644 --- a/src/itype.h +++ b/src/itype.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ITYPE_H -#define ITYPE_H +#ifndef CATA_SRC_ITYPE_H +#define CATA_SRC_ITYPE_H #include #include @@ -1092,4 +1092,4 @@ struct itype { virtual ~itype() = default; }; -#endif +#endif // CATA_SRC_ITYPE_H diff --git a/src/iuse.h b/src/iuse.h index 219eaa7d87d60..eba1e02f76572 100644 --- a/src/iuse.h +++ b/src/iuse.h @@ -1,6 +1,6 @@ #pragma once -#ifndef IUSE_H -#define IUSE_H +#ifndef CATA_SRC_IUSE_H +#define CATA_SRC_IUSE_H #include #include @@ -331,4 +331,4 @@ struct use_function { void dump_info( const item &, std::vector & ) const; }; -#endif +#endif // CATA_SRC_IUSE_H diff --git a/src/iuse_actor.h b/src/iuse_actor.h index 1418c09cdfa18..9ceee17f4a982 100644 --- a/src/iuse_actor.h +++ b/src/iuse_actor.h @@ -1,6 +1,6 @@ #pragma once -#ifndef IUSE_ACTOR_H -#define IUSE_ACTOR_H +#ifndef CATA_SRC_IUSE_ACTOR_H +#define CATA_SRC_IUSE_ACTOR_H #include #include @@ -1208,4 +1208,4 @@ class sew_advanced_actor : public iuse_actor int use( player &, item &, bool, const tripoint & ) const override; std::unique_ptr clone() const override; }; -#endif +#endif // CATA_SRC_IUSE_ACTOR_H diff --git a/src/iuse_software.h b/src/iuse_software.h index e8bb46c862b6d..349afa74f017b 100644 --- a/src/iuse_software.h +++ b/src/iuse_software.h @@ -1,6 +1,6 @@ #pragma once -#ifndef IUSE_SOFTWARE_H -#define IUSE_SOFTWARE_H +#ifndef CATA_SRC_IUSE_SOFTWARE_H +#define CATA_SRC_IUSE_SOFTWARE_H #include #include @@ -9,4 +9,4 @@ bool play_videogame( const std::string &function_name, std::map &game_data, int &score ); -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_H diff --git a/src/iuse_software_kitten.h b/src/iuse_software_kitten.h index 2052f542b3dbb..e2adc1791b822 100644 --- a/src/iuse_software_kitten.h +++ b/src/iuse_software_kitten.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOFTWARE_KITTEN_H -#define SOFTWARE_KITTEN_H +#ifndef CATA_SRC_IUSE_SOFTWARE_KITTEN_H +#define CATA_SRC_IUSE_SOFTWARE_KITTEN_H #include @@ -41,4 +41,4 @@ class robot_finds_kitten int bogus_messages[MAXMESSAGES]; }; -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_KITTEN_H diff --git a/src/iuse_software_lightson.h b/src/iuse_software_lightson.h index 78d2915b39655..f4b4f7c7e7a11 100644 --- a/src/iuse_software_lightson.h +++ b/src/iuse_software_lightson.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOFTWARE_LIGHTSON_H -#define SOFTWARE_LIGHTSON_H +#ifndef CATA_SRC_IUSE_SOFTWARE_LIGHTSON_H +#define CATA_SRC_IUSE_SOFTWARE_LIGHTSON_H #include #include @@ -32,4 +32,4 @@ class lightson_game lightson_game() = default; }; -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_LIGHTSON_H diff --git a/src/iuse_software_minesweeper.h b/src/iuse_software_minesweeper.h index 9d2b77bef363c..5a2ee3cb2b47b 100644 --- a/src/iuse_software_minesweeper.h +++ b/src/iuse_software_minesweeper.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOFTWARE_MINESWEEPER_H -#define SOFTWARE_MINESWEEPER_H +#ifndef CATA_SRC_IUSE_SOFTWARE_MINESWEEPER_H +#define CATA_SRC_IUSE_SOFTWARE_MINESWEEPER_H #include @@ -40,4 +40,4 @@ class minesweeper_game minesweeper_game(); }; -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_MINESWEEPER_H diff --git a/src/iuse_software_snake.h b/src/iuse_software_snake.h index dca6f11e554f5..fd743c48c5e8a 100644 --- a/src/iuse_software_snake.h +++ b/src/iuse_software_snake.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOFTWARE_SNAKE_H -#define SOFTWARE_SNAKE_H +#ifndef CATA_SRC_IUSE_SOFTWARE_SNAKE_H +#define CATA_SRC_IUSE_SOFTWARE_SNAKE_H namespace catacurses { @@ -17,4 +17,4 @@ class snake_game int start_game(); }; -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_SNAKE_H diff --git a/src/iuse_software_sokoban.h b/src/iuse_software_sokoban.h index f8960dc6c7c55..b711d91fa27c9 100644 --- a/src/iuse_software_sokoban.h +++ b/src/iuse_software_sokoban.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOFTWARE_SOKOBAN_H -#define SOFTWARE_SOKOBAN_H +#ifndef CATA_SRC_IUSE_SOFTWARE_SOKOBAN_H +#define CATA_SRC_IUSE_SOFTWARE_SOKOBAN_H #include #include @@ -59,4 +59,4 @@ class sokoban_game sokoban_game(); }; -#endif +#endif // CATA_SRC_IUSE_SOFTWARE_SOKOBAN_H diff --git a/src/json.h b/src/json.h index 4a3a8e4522560..fdedbb6750fae 100644 --- a/src/json.h +++ b/src/json.h @@ -1,6 +1,6 @@ #pragma once -#ifndef JSON_H -#define JSON_H +#ifndef CATA_SRC_JSON_H +#define CATA_SRC_JSON_H #include #include @@ -1416,4 +1416,4 @@ void deserialize( cata::optional &obj, JsonIn &jsin ) } } -#endif +#endif // CATA_SRC_JSON_H diff --git a/src/kill_tracker.h b/src/kill_tracker.h index 5bb19af8de160..24ad24f607fdc 100644 --- a/src/kill_tracker.h +++ b/src/kill_tracker.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_KILL_TRACKER_H -#define CATA_KILL_TRACKER_H +#ifndef CATA_SRC_KILL_TRACKER_H +#define CATA_SRC_KILL_TRACKER_H #include #include @@ -44,4 +44,4 @@ class kill_tracker : public event_subscriber std::vector npc_kills; // names of NPCs the player killed }; -#endif // CATA_KILL_TRACKER_H +#endif // CATA_SRC_KILL_TRACKER_H diff --git a/src/lightmap.h b/src/lightmap.h index 5068d82398ff7..8df48f6273a52 100644 --- a/src/lightmap.h +++ b/src/lightmap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef LIGHTMAP_H -#define LIGHTMAP_H +#ifndef CATA_SRC_LIGHTMAP_H +#define CATA_SRC_LIGHTMAP_H #include @@ -35,4 +35,4 @@ enum lit_level { LL_BLANK // blank space, not an actual light level }; -#endif +#endif // CATA_SRC_LIGHTMAP_H diff --git a/src/line.h b/src/line.h index 43f4b1377a733..a7d9358a07840 100644 --- a/src/line.h +++ b/src/line.h @@ -1,6 +1,6 @@ #pragma once -#ifndef LINE_H -#define LINE_H +#ifndef CATA_SRC_LINE_H +#define CATA_SRC_LINE_H #include #include @@ -282,4 +282,4 @@ struct rl_vec3d { rl_vec3d operator+ ( const rl_vec3d &rhs ) const; }; -#endif +#endif // CATA_SRC_LINE_H diff --git a/src/list.h b/src/list.h index 53d2846c81c84..ed9814609c719 100644 --- a/src/list.h +++ b/src/list.h @@ -21,8 +21,8 @@ // 3. This notice may not be removed or altered from any source distribution. #pragma once -#ifndef LIST_H -#define LIST_H +#ifndef CATA_SRC_LIST_H +#define CATA_SRC_LIST_H #define LIST_BLOCK_MIN static_cast((sizeof(node) * 8 > (sizeof(*this) + sizeof(group)) * 2) ? 8 : (((sizeof(*this) + sizeof(group)) * 2) / sizeof(node)) + 1) #define LIST_BLOCK_MAX 2048 @@ -2467,4 +2467,4 @@ inline void swap( list &a, #undef LIST_ALLOCATE_INITIALIZATION #undef LIST_DEALLOCATE -#endif // LIST_H +#endif // CATA_SRC_LIST_H diff --git a/src/live_view.h b/src/live_view.h index 703075eef7382..9d5b42704f4bb 100644 --- a/src/live_view.h +++ b/src/live_view.h @@ -1,6 +1,6 @@ #pragma once -#ifndef LIVE_VIEW_H -#define LIVE_VIEW_H +#ifndef CATA_SRC_LIVE_VIEW_H +#define CATA_SRC_LIVE_VIEW_H #include "point.h" @@ -26,4 +26,4 @@ class live_view bool enabled = false; }; -#endif +#endif // CATA_SRC_LIVE_VIEW_H diff --git a/src/loading_ui.h b/src/loading_ui.h index 56b38a3cecc96..ec69d6a8b3d07 100644 --- a/src/loading_ui.h +++ b/src/loading_ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef LOADING_UI_H -#define LOADING_UI_H +#ifndef CATA_SRC_LOADING_UI_H +#define CATA_SRC_LOADING_UI_H #include #include @@ -40,4 +40,4 @@ class loading_ui void show(); }; -#endif +#endif // CATA_SRC_LOADING_UI_H diff --git a/src/lru_cache.h b/src/lru_cache.h index ee554e25036ee..0a3d8733b96de 100644 --- a/src/lru_cache.h +++ b/src/lru_cache.h @@ -1,6 +1,6 @@ #pragma once -#ifndef LRU_CACHE_H -#define LRU_CACHE_H +#ifndef CATA_SRC_LRU_CACHE_H +#define CATA_SRC_LRU_CACHE_H #include #include @@ -29,4 +29,4 @@ class lru_cache std::unordered_map::iterator> map; }; -#endif +#endif // CATA_SRC_LRU_CACHE_H diff --git a/src/magic.h b/src/magic.h index be7816a2fc427..d8894ae769307 100644 --- a/src/magic.h +++ b/src/magic.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAGIC_H -#define MAGIC_H +#ifndef CATA_SRC_MAGIC_H +#define CATA_SRC_MAGIC_H #include #include @@ -609,4 +609,4 @@ struct area_expander { void sort_descending(); }; -#endif +#endif // CATA_SRC_MAGIC_H diff --git a/src/magic_enchantment.h b/src/magic_enchantment.h index 7d3e1bb3ff372..8ba26adc2b874 100644 --- a/src/magic_enchantment.h +++ b/src/magic_enchantment.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAGIC_ENCHANTMENT_H -#define MAGIC_ENCHANTMENT_H +#ifndef CATA_SRC_MAGIC_ENCHANTMENT_H +#define CATA_SRC_MAGIC_ENCHANTMENT_H #include #include @@ -171,4 +171,4 @@ class enchantment const fake_spell &sp ) const; }; -#endif +#endif // CATA_SRC_MAGIC_ENCHANTMENT_H diff --git a/src/magic_teleporter_list.h b/src/magic_teleporter_list.h index dfe0944e7b49a..4e925c0d37477 100644 --- a/src/magic_teleporter_list.h +++ b/src/magic_teleporter_list.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TELEPORTER_LIST_H -#define TELEPORTER_LIST_H +#ifndef CATA_SRC_MAGIC_TELEPORTER_LIST_H +#define CATA_SRC_MAGIC_TELEPORTER_LIST_H #include #include @@ -38,4 +38,4 @@ class teleporter_list void deserialize( JsonIn &jsin ); }; -#endif // !TELEPORTER_LIST_H +#endif // CATA_SRC_MAGIC_TELEPORTER_LIST_H diff --git a/src/magic_ter_furn_transform.h b/src/magic_ter_furn_transform.h index c12b3399863cc..3a65ba06780ca 100644 --- a/src/magic_ter_furn_transform.h +++ b/src/magic_ter_furn_transform.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAGIC_TER_FURN_TRANSFORM_H -#define MAGIC_TER_FURN_TRANSFORM_H +#ifndef CATA_SRC_MAGIC_TER_FURN_TRANSFORM_H +#define CATA_SRC_MAGIC_TER_FURN_TRANSFORM_H #include #include @@ -83,4 +83,4 @@ class ter_furn_transform bool is_valid() const; }; -#endif +#endif // CATA_SRC_MAGIC_TER_FURN_TRANSFORM_H diff --git a/src/main_menu.h b/src/main_menu.h index 5f9e8507c3c4b..188d66ac4fe44 100644 --- a/src/main_menu.h +++ b/src/main_menu.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAIN_MENU_H -#define MAIN_MENU_H +#ifndef CATA_SRC_MAIN_MENU_H +#define CATA_SRC_MAIN_MENU_H #include #include @@ -108,5 +108,5 @@ class main_menu std::string halloween_graves(); }; -#endif +#endif // CATA_SRC_MAIN_MENU_H diff --git a/src/map.h b/src/map.h index 92fed42ea3429..4b6440b3b48c2 100644 --- a/src/map.h +++ b/src/map.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_H -#define MAP_H +#ifndef CATA_SRC_MAP_H +#define CATA_SRC_MAP_H #include #include @@ -1842,4 +1842,4 @@ class fake_map : public tinymap int fake_map_z ); ~fake_map() override; }; -#endif +#endif // CATA_SRC_MAP_H diff --git a/src/map_extras.h b/src/map_extras.h index e28a9204386a3..d625fb63543f5 100644 --- a/src/map_extras.h +++ b/src/map_extras.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_EXTRAS_H -#define MAP_EXTRAS_H +#ifndef CATA_SRC_MAP_EXTRAS_H +#define CATA_SRC_MAP_EXTRAS_H #include #include @@ -81,4 +81,4 @@ const generic_factory &mapExtraFactory(); } // namespace MapExtras -#endif +#endif // CATA_SRC_MAP_EXTRAS_H diff --git a/src/map_item_stack.h b/src/map_item_stack.h index 2e2b2c40627cc..9f27c5ac3cd28 100644 --- a/src/map_item_stack.h +++ b/src/map_item_stack.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_ITEM_STACK_H -#define MAP_ITEM_STACK_H +#ifndef CATA_SRC_MAP_ITEM_STACK_H +#define CATA_SRC_MAP_ITEM_STACK_H #include #include @@ -47,4 +47,4 @@ int list_filter_high_priority( std::vector &stack, const std::st int list_filter_low_priority( std::vector &stack, int start, const std::string &priorities ); -#endif +#endif // CATA_SRC_MAP_ITEM_STACK_H diff --git a/src/map_iterator.h b/src/map_iterator.h index 7e0ec07dc8940..aa3048b9aae7a 100644 --- a/src/map_iterator.h +++ b/src/map_iterator.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_ITERATOR_H -#define MAP_ITERATOR_H +#ifndef CATA_SRC_MAP_ITERATOR_H +#define CATA_SRC_MAP_ITERATOR_H #include @@ -125,4 +125,4 @@ inline tripoint_range points_in_radius( const tripoint ¢er, const int radius return tripoint_range( center - offset, center + offset ); } -#endif +#endif // CATA_SRC_MAP_ITERATOR_H diff --git a/src/map_memory.h b/src/map_memory.h index eac66be84cada..81f80e16b38df 100644 --- a/src/map_memory.h +++ b/src/map_memory.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_MEMORY_H -#define MAP_MEMORY_H +#ifndef CATA_SRC_MAP_MEMORY_H +#define CATA_SRC_MAP_MEMORY_H #include @@ -39,4 +39,4 @@ class map_memory lru_cache symbol_cache; }; -#endif +#endif // CATA_SRC_MAP_MEMORY_H diff --git a/src/map_selector.h b/src/map_selector.h index 9f084295cf75b..a4d6e2b25ee7c 100644 --- a/src/map_selector.h +++ b/src/map_selector.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_SELECTOR_H -#define MAP_SELECTOR_H +#ifndef CATA_SRC_MAP_SELECTOR_H +#define CATA_SRC_MAP_SELECTOR_H #include @@ -70,4 +70,4 @@ class map_selector : public visitable std::vector data; }; -#endif +#endif // CATA_SRC_MAP_SELECTOR_H diff --git a/src/mapbuffer.h b/src/mapbuffer.h index 1517b5e7bcd25..6f681abed8b9b 100644 --- a/src/mapbuffer.h +++ b/src/mapbuffer.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPBUFFER_H -#define MAPBUFFER_H +#ifndef CATA_SRC_MAPBUFFER_H +#define CATA_SRC_MAPBUFFER_H #include #include @@ -82,4 +82,4 @@ class mapbuffer extern mapbuffer MAPBUFFER; -#endif +#endif // CATA_SRC_MAPBUFFER_H diff --git a/src/mapdata.h b/src/mapdata.h index 74a75cb7ff618..4b52ca3ee8055 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPDATA_H -#define MAPDATA_H +#ifndef CATA_SRC_MAPDATA_H +#define CATA_SRC_MAPDATA_H #include #include @@ -574,4 +574,4 @@ void check_furniture_and_terrain(); void finalize_furniture_and_terrain(); -#endif +#endif // CATA_SRC_MAPDATA_H diff --git a/src/mapgen.h b/src/mapgen.h index 5828e0483e136..6f21a34486f6a 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPGEN_H -#define MAPGEN_H +#ifndef CATA_SRC_MAPGEN_H +#define CATA_SRC_MAPGEN_H #include #include @@ -468,4 +468,4 @@ void circle( map *m, const ter_id &type, const point &, int rad ); void circle_furn( map *m, const furn_id &type, const point &, int rad ); void add_corpse( map *m, const point & ); -#endif +#endif // CATA_SRC_MAPGEN_H diff --git a/src/mapgen_functions.h b/src/mapgen_functions.h index 14246d78c5ca6..e83d54bbc067b 100644 --- a/src/mapgen_functions.h +++ b/src/mapgen_functions.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPGEN_FUNCTIONS_H -#define MAPGEN_FUNCTIONS_H +#ifndef CATA_SRC_MAPGEN_FUNCTIONS_H +#define CATA_SRC_MAPGEN_FUNCTIONS_H #include #include @@ -90,4 +90,4 @@ std::pair, std::map> get_changed_ids_from_up void resolve_regional_terrain_and_furniture( const mapgendata &dat ); -#endif +#endif // CATA_SRC_MAPGEN_FUNCTIONS_H diff --git a/src/mapgendata.h b/src/mapgendata.h index ab32655471ab9..76bc04a0a288c 100644 --- a/src/mapgendata.h +++ b/src/mapgendata.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPGENDATA_H -#define MAPGENDATA_H +#ifndef CATA_SRC_MAPGENDATA_H +#define CATA_SRC_MAPGENDATA_H #include "type_id.h" #include "calendar.h" @@ -138,4 +138,4 @@ class mapgendata bool is_groundcover( const ter_id &iid ) const; }; -#endif +#endif // CATA_SRC_MAPGENDATA_H diff --git a/src/mapgenformat.h b/src/mapgenformat.h index 5953104f5f028..ebdf3cc34e554 100644 --- a/src/mapgenformat.h +++ b/src/mapgenformat.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPGENFORMAT_H -#define MAPGENFORMAT_H +#ifndef CATA_SRC_MAPGENFORMAT_H +#define CATA_SRC_MAPGENFORMAT_H #include #include @@ -85,4 +85,4 @@ inline format_effect furn_bind( const char ( &characters )[N], Args... } //END NAMESPACE mapf -#endif +#endif // CATA_SRC_MAPGENFORMAT_H diff --git a/src/mapsharing.h b/src/mapsharing.h index 77488b719fd20..923b2e05a6bed 100644 --- a/src/mapsharing.h +++ b/src/mapsharing.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAPSHARING_H -#define MAPSHARING_H +#ifndef CATA_SRC_MAPSHARING_H +#define CATA_SRC_MAPSHARING_H #include #include @@ -39,4 +39,4 @@ void addDebugger( const std::string &name ); void setDefaults(); } // namespace MAP_SHARING -#endif +#endif // CATA_SRC_MAPSHARING_H diff --git a/src/martialarts.h b/src/martialarts.h index 908bedec9cdf5..f78c91b8cb311 100644 --- a/src/martialarts.h +++ b/src/martialarts.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MARTIALARTS_H -#define MARTIALARTS_H +#ifndef CATA_SRC_MARTIALARTS_H +#define CATA_SRC_MARTIALARTS_H #include #include @@ -297,4 +297,4 @@ std::string martialart_difficulty( const matype_id &mstyle ); std::vector all_martialart_types(); std::vector autolearn_martialart_types(); -#endif +#endif // CATA_SRC_MARTIALARTS_H diff --git a/src/material.h b/src/material.h index 9545fe4f5e682..edf12789efd1a 100644 --- a/src/material.h +++ b/src/material.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MATERIAL_H -#define MATERIAL_H +#ifndef CATA_SRC_MATERIAL_H +#define CATA_SRC_MATERIAL_H #include #include @@ -125,4 +125,4 @@ std::set get_rotting(); } // namespace materials -#endif +#endif // CATA_SRC_MATERIAL_H diff --git a/src/math_defines.h b/src/math_defines.h index d3844756ba353..6419f069b6c90 100644 --- a/src/math_defines.h +++ b/src/math_defines.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_MATH_DEFINES_H -#define CATA_MATH_DEFINES_H +#ifndef CATA_SRC_MATH_DEFINES_H +#define CATA_SRC_MATH_DEFINES_H // On Visual Studio math.h only provides the defines (M_PI, etc.) if // _USE_MATH_DEFINES is defined before including it. @@ -29,4 +29,4 @@ #define M_SQRT2 1.41421356237309504880 #endif -#endif // CATA_MATH_DEFINES_H +#endif // CATA_SRC_MATH_DEFINES_H diff --git a/src/mattack_actors.h b/src/mattack_actors.h index d92b8b9209f3f..cb0e202ca1feb 100644 --- a/src/mattack_actors.h +++ b/src/mattack_actors.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MATTACK_ACTORS_H -#define MATTACK_ACTORS_H +#ifndef CATA_SRC_MATTACK_ACTORS_H +#define CATA_SRC_MATTACK_ACTORS_H #include #include @@ -192,4 +192,4 @@ class gun_actor : public mattack_actor std::unique_ptr clone() const override; }; -#endif +#endif // CATA_SRC_MATTACK_ACTORS_H diff --git a/src/mattack_common.h b/src/mattack_common.h index 0ed7369b8f8d4..6c14ba14d5a46 100644 --- a/src/mattack_common.h +++ b/src/mattack_common.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MATTACK_COMMON_H -#define MATTACK_COMMON_H +#ifndef CATA_SRC_MATTACK_COMMON_H +#define CATA_SRC_MATTACK_COMMON_H #include #include @@ -57,4 +57,4 @@ struct mtype_special_attack { } }; -#endif +#endif // CATA_SRC_MATTACK_COMMON_H diff --git a/src/melee.h b/src/melee.h index a2f4eaf5138da..0a600e928919b 100644 --- a/src/melee.h +++ b/src/melee.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MELEE_H -#define MELEE_H +#ifndef CATA_SRC_MELEE_H +#define CATA_SRC_MELEE_H namespace melee { @@ -9,4 +9,4 @@ float melee_hit_range( float accuracy ); } // namespace melee -#endif +#endif // CATA_SRC_MELEE_H diff --git a/src/memorial_logger.h b/src/memorial_logger.h index f9dfa7cb894a8..52fc2ee637114 100644 --- a/src/memorial_logger.h +++ b/src/memorial_logger.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_MEMORIAL_LOGGER_H -#define CATA_MEMORIAL_LOGGER_H +#ifndef CATA_SRC_MEMORIAL_LOGGER_H +#define CATA_SRC_MEMORIAL_LOGGER_H #include #include @@ -48,4 +48,4 @@ class memorial_logger : public event_subscriber std::vector log; }; -#endif // CATA_MEMORIAL_LOGGER_H +#endif // CATA_SRC_MEMORIAL_LOGGER_H diff --git a/src/memory_fast.h b/src/memory_fast.h index f1b2a32022044..93bf49ce2d16a 100644 --- a/src/memory_fast.h +++ b/src/memory_fast.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SINGLETHREADED_PTRS_H -#define SINGLETHREADED_PTRS_H +#ifndef CATA_SRC_MEMORY_FAST_H +#define CATA_SRC_MEMORY_FAST_H #include @@ -22,4 +22,4 @@ template shared_ptr_fast make_shared_fast( } #endif -#endif +#endif // CATA_SRC_MEMORY_FAST_H diff --git a/src/messages.h b/src/messages.h index 3813857cedb5c..65cac42f7c976 100644 --- a/src/messages.h +++ b/src/messages.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MESSAGES_H -#define MESSAGES_H +#ifndef CATA_SRC_MESSAGES_H +#define CATA_SRC_MESSAGES_H #include #include @@ -71,4 +71,4 @@ inline void add_msg( const game_message_params ¶ms, const char *const msg, A return add_msg( params, string_format( msg, std::forward( args )... ) ); } -#endif +#endif // CATA_SRC_MESSAGES_H diff --git a/src/mission.h b/src/mission.h index efa4ca3b46fdb..edc510edcabb6 100644 --- a/src/mission.h +++ b/src/mission.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MISSION_H -#define MISSION_H +#ifndef CATA_SRC_MISSION_H +#define CATA_SRC_MISSION_H #include #include @@ -474,4 +474,4 @@ struct enum_traits { static constexpr mission::mission_status last = mission::mission_status::num_mission_status; }; -#endif +#endif // CATA_SRC_MISSION_H diff --git a/src/mission_companion.h b/src/mission_companion.h index 9095c338386aa..955743e20d3f6 100644 --- a/src/mission_companion.h +++ b/src/mission_companion.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MISSION_COMPANION_H -#define MISSION_COMPANION_H +#ifndef CATA_SRC_MISSION_COMPANION_H +#define CATA_SRC_MISSION_COMPANION_H #include #include @@ -150,4 +150,4 @@ void companion_return( npc &comp ); void loot_building( const tripoint &site ); } // namespace talk_function -#endif +#endif // CATA_SRC_MISSION_COMPANION_H diff --git a/src/mod_manager.h b/src/mod_manager.h index a9725e26cf9e6..63064ad27d205 100644 --- a/src/mod_manager.h +++ b/src/mod_manager.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MOD_MANAGER_H -#define MOD_MANAGER_H +#ifndef CATA_SRC_MOD_MANAGER_H +#define CATA_SRC_MOD_MANAGER_H #include #include @@ -182,4 +182,4 @@ class mod_ui bool can_shift_down( size_t selection, const std::vector &active_list ); }; -#endif +#endif // CATA_SRC_MOD_MANAGER_H diff --git a/src/mod_tileset.h b/src/mod_tileset.h index 4e41a3f1a9776..03914ce0e71b6 100644 --- a/src/mod_tileset.h +++ b/src/mod_tileset.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MOD_TILESET_H -#define MOD_TILESET_H +#ifndef CATA_SRC_MOD_TILESET_H +#define CATA_SRC_MOD_TILESET_H #include #include @@ -45,4 +45,4 @@ class mod_tileset std::vector compatibility; }; -#endif +#endif // CATA_SRC_MOD_TILESET_H diff --git a/src/monattack.h b/src/monattack.h index 3501ea740b63f..44b616213cc36 100644 --- a/src/monattack.h +++ b/src/monattack.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONATTACK_H -#define MONATTACK_H +#ifndef CATA_SRC_MONATTACK_H +#define CATA_SRC_MONATTACK_H class monster; class Creature; @@ -116,4 +116,4 @@ void flame( monster *z, Creature *target ); bool dodge_check( monster *z, Creature *target ); } //namespace mattack -#endif +#endif // CATA_SRC_MONATTACK_H diff --git a/src/mondeath.h b/src/mondeath.h index ac6c6ada367d5..0e914960654d1 100644 --- a/src/mondeath.h +++ b/src/mondeath.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONDEATH_H -#define MONDEATH_H +#ifndef CATA_SRC_MONDEATH_H +#define CATA_SRC_MONDEATH_H class monster; @@ -87,4 +87,4 @@ void gameover( monster &z ); void make_mon_corpse( monster &z, int damageLvl ); -#endif +#endif // CATA_SRC_MONDEATH_H diff --git a/src/mondefense.h b/src/mondefense.h index 7e7cc4de4bb79..a0453c43ecccf 100644 --- a/src/mondefense.h +++ b/src/mondefense.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONDEFENSE_H -#define MONDEFENSE_H +#ifndef CATA_SRC_MONDEFENSE_H +#define CATA_SRC_MONDEFENSE_H class monster; class Creature; @@ -21,4 +21,4 @@ void return_fire( monster &m, Creature *source, const dealt_projectile_attack *p void none( monster &, Creature *, const dealt_projectile_attack * ); } //namespace mdefense -#endif +#endif // CATA_SRC_MONDEFENSE_H diff --git a/src/monexamine.h b/src/monexamine.h index fa869eb2d11c5..9dd9c55ab70f8 100644 --- a/src/monexamine.h +++ b/src/monexamine.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONEXAMINE_H -#define MONEXAMINE_H +#ifndef CATA_SRC_MONEXAMINE_H +#define CATA_SRC_MONEXAMINE_H class monster; @@ -34,4 +34,4 @@ void attach_or_remove_saddle( monster &z ); */ void milk_source( monster &source_mon ); } // namespace monexamine -#endif +#endif // CATA_SRC_MONEXAMINE_H diff --git a/src/monfaction.h b/src/monfaction.h index 474f367af29ca..d4b3924091d66 100644 --- a/src/monfaction.h +++ b/src/monfaction.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONFACTION_H -#define MONFACTION_H +#ifndef CATA_SRC_MONFACTION_H +#define CATA_SRC_MONFACTION_H #include @@ -36,4 +36,4 @@ class monfaction mf_attitude attitude( const mfaction_id &other ) const; }; -#endif +#endif // CATA_SRC_MONFACTION_H diff --git a/src/mongroup.h b/src/mongroup.h index f8ea06b076c0b..9b9dc25dd52b3 100644 --- a/src/mongroup.h +++ b/src/mongroup.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONGROUP_H -#define MONGROUP_H +#ifndef CATA_SRC_MONGROUP_H +#define CATA_SRC_MONGROUP_H #include #include @@ -193,4 +193,4 @@ class MonsterGroupManager static t_string_set monster_categories_whitelist; }; -#endif +#endif // CATA_SRC_MONGROUP_H diff --git a/src/monster.h b/src/monster.h index 1e6364531373b..ab74660170d68 100644 --- a/src/monster.h +++ b/src/monster.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONSTER_H -#define MONSTER_H +#ifndef CATA_SRC_MONSTER_H +#define CATA_SRC_MONSTER_H #include #include @@ -568,4 +568,4 @@ class monster : public Creature void process_one_effect( effect &it, bool is_new ) override; }; -#endif +#endif // CATA_SRC_MONSTER_H diff --git a/src/monstergenerator.h b/src/monstergenerator.h index 98558a9d7897d..8810df21cd42c 100644 --- a/src/monstergenerator.h +++ b/src/monstergenerator.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MONSTERGENERATOR_H -#define MONSTERGENERATOR_H +#ifndef CATA_SRC_MONSTERGENERATOR_H +#define CATA_SRC_MONSTERGENERATOR_H #include #include @@ -113,4 +113,4 @@ class MonsterGenerator void load_monster_adjustment( const JsonObject &jsobj ); -#endif +#endif // CATA_SRC_MONSTERGENERATOR_H diff --git a/src/morale.h b/src/morale.h index 48920e0b38f35..4dcb145d029b8 100644 --- a/src/morale.h +++ b/src/morale.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MORALE_H -#define MORALE_H +#ifndef CATA_SRC_MORALE_H +#define CATA_SRC_MORALE_H #include #include @@ -208,4 +208,4 @@ class player_morale int perceived_pain; }; -#endif +#endif // CATA_SRC_MORALE_H diff --git a/src/morale_types.h b/src/morale_types.h index bcefde2051d78..ba1073a926320 100644 --- a/src/morale_types.h +++ b/src/morale_types.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MORALE_TYPES_H -#define MORALE_TYPES_H +#ifndef CATA_SRC_MORALE_TYPES_H +#define CATA_SRC_MORALE_TYPES_H #include @@ -115,4 +115,4 @@ extern const morale_type MORALE_TREE_COMMUNION; extern const morale_type MORALE_ACCOMPLISHMENT; extern const morale_type MORALE_FAILURE; -#endif +#endif // CATA_SRC_MORALE_TYPES_H diff --git a/src/mtype.h b/src/mtype.h index ed248d9e388ec..3f1fad40b8031 100644 --- a/src/mtype.h +++ b/src/mtype.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MTYPE_H -#define MTYPE_H +#ifndef CATA_SRC_MTYPE_H +#define CATA_SRC_MTYPE_H #include #include @@ -392,4 +392,4 @@ struct mtype { mon_effect_data load_mon_effect_data( const JsonObject &e ); -#endif +#endif // CATA_SRC_MTYPE_H diff --git a/src/mutation.h b/src/mutation.h index 5ce9fde40dee9..0e93f0889f506 100644 --- a/src/mutation.h +++ b/src/mutation.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MUTATION_H -#define MUTATION_H +#ifndef CATA_SRC_MUTATION_H +#define CATA_SRC_MUTATION_H #include #include @@ -507,4 +507,4 @@ mutagen_attempt mutagen_common_checks( player &p, const item &it, bool strong, void test_crossing_threshold( Character &guy, const mutation_category_trait &m_category ); -#endif +#endif // CATA_SRC_MUTATION_H diff --git a/src/name.h b/src/name.h index 5f5ed19f86ea7..50d0aec28d03a 100644 --- a/src/name.h +++ b/src/name.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NAME_H -#define NAME_H +#ifndef CATA_SRC_NAME_H +#define CATA_SRC_NAME_H #include @@ -41,4 +41,4 @@ inline nameFlags operator&( nameFlags l, nameFlags r ) return static_cast( static_cast( l ) & static_cast( r ) ); } -#endif +#endif // CATA_SRC_NAME_H diff --git a/src/npc.h b/src/npc.h index 5f6192a2bf374..30fae17070f6c 100644 --- a/src/npc.h +++ b/src/npc.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NPC_H -#define NPC_H +#ifndef CATA_SRC_NPC_H +#define CATA_SRC_NPC_H #include #include @@ -1429,4 +1429,4 @@ std::ostream &operator<< ( std::ostream &os, const npc_need &need ); /** Opens a menu and allows player to select a friendly NPC. */ npc *pick_follower(); -#endif +#endif // CATA_SRC_NPC_H diff --git a/src/npc_class.h b/src/npc_class.h index f3ce9ad723e48..c2011da2a03c4 100644 --- a/src/npc_class.h +++ b/src/npc_class.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NPC_CLASS_H -#define NPC_CLASS_H +#ifndef CATA_SRC_NPC_CLASS_H +#define CATA_SRC_NPC_CLASS_H #include #include @@ -132,4 +132,4 @@ extern npc_class_id NC_BARTENDER; extern npc_class_id NC_JUNK_SHOPKEEP; extern npc_class_id NC_HALLU; -#endif +#endif // CATA_SRC_NPC_CLASS_H diff --git a/src/npc_favor.h b/src/npc_favor.h index 6b285da89e270..5b953ba6ee3eb 100644 --- a/src/npc_favor.h +++ b/src/npc_favor.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NPC_FAVOR_H -#define NPC_FAVOR_H +#ifndef CATA_SRC_NPC_FAVOR_H +#define CATA_SRC_NPC_FAVOR_H #include @@ -36,4 +36,4 @@ struct npc_favor { void deserialize( JsonIn &jsin ); }; -#endif +#endif // CATA_SRC_NPC_FAVOR_H diff --git a/src/npctalk.h b/src/npctalk.h index 4aa558fc29679..9dd6407392794 100644 --- a/src/npctalk.h +++ b/src/npctalk.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NPCTALK_H -#define NPCTALK_H +#ifndef CATA_SRC_NPCTALK_H +#define CATA_SRC_NPCTALK_H #include "type_id.h" @@ -95,4 +95,4 @@ time_duration calc_skill_training_time( const npc &p, const skill_id &skill ); int calc_skill_training_cost( const npc &p, const skill_id &skill ); time_duration calc_ma_style_training_time( const npc &, const matype_id & /* id */ ); int calc_ma_style_training_cost( const npc &p, const matype_id & /* id */ ); -#endif +#endif // CATA_SRC_NPCTALK_H diff --git a/src/npctrade.h b/src/npctrade.h index 52a8d8a5403bd..27f23428f9186 100644 --- a/src/npctrade.h +++ b/src/npctrade.h @@ -1,6 +1,6 @@ #pragma once -#ifndef NPCTRADE_H -#define NPCTRADE_H +#ifndef CATA_SRC_NPCTRADE_H +#define CATA_SRC_NPCTRADE_H #include #include @@ -102,4 +102,4 @@ std::vector init_selling( npc &p ); std::vector init_buying( player &buyer, player &seller, bool is_npc ); } // namespace npc_trading -#endif +#endif // CATA_SRC_NPCTRADE_H diff --git a/src/omdata.h b/src/omdata.h index 1f3e12cdd683b..c80728c6d24f5 100644 --- a/src/omdata.h +++ b/src/omdata.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OMDATA_H -#define OMDATA_H +#ifndef CATA_SRC_OMDATA_H +#define CATA_SRC_OMDATA_H #include #include @@ -509,4 +509,4 @@ void load( const JsonObject &jo, const std::string &src ); } // namespace city_buildings -#endif +#endif // CATA_SRC_OMDATA_H diff --git a/src/optional.h b/src/optional.h index 618efa148dd30..b944394d17673 100644 --- a/src/optional.h +++ b/src/optional.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OPTIONAL_H -#define OPTIONAL_H +#ifndef CATA_SRC_OPTIONAL_H +#define CATA_SRC_OPTIONAL_H #include #include @@ -254,4 +254,4 @@ constexpr bool operator!=( const optional &lhs, const optional &rhs ) } // namespace cata -#endif +#endif // CATA_SRC_OPTIONAL_H diff --git a/src/options.h b/src/options.h index 72f9b6c4d50e4..e7c4c822fc28c 100644 --- a/src/options.h +++ b/src/options.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OPTIONS_H -#define OPTIONS_H +#ifndef CATA_SRC_OPTIONS_H +#define CATA_SRC_OPTIONS_H #include #include @@ -323,4 +323,4 @@ inline T get_option( const std::string &name ) return get_options().get_option( name ).value_as(); } -#endif +#endif // CATA_SRC_OPTIONS_H diff --git a/src/output.h b/src/output.h index 09439aa99466e..d525e693d8f98 100644 --- a/src/output.h +++ b/src/output.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OUTPUT_H -#define OUTPUT_H +#ifndef CATA_SRC_OUTPUT_H +#define CATA_SRC_OUTPUT_H #include #include @@ -983,4 +983,4 @@ std::string colorize_symbols( const std::string &str, F color_of ) return res; } -#endif +#endif // CATA_SRC_OUTPUT_H diff --git a/src/overlay_ordering.h b/src/overlay_ordering.h index f463c8cac9489..534053aa90fb4 100644 --- a/src/overlay_ordering.h +++ b/src/overlay_ordering.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERLAY_ORDERING_H -#define OVERLAY_ORDERING_H +#ifndef CATA_SRC_OVERLAY_ORDERING_H +#define CATA_SRC_OVERLAY_ORDERING_H #include #include @@ -16,4 +16,4 @@ void load_overlay_ordering_into_array( const JsonObject &jsobj, int get_overlay_order_of_mutation( const std::string &mutation_id_string ); void reset_overlay_ordering(); -#endif +#endif // CATA_SRC_OVERLAY_ORDERING_H diff --git a/src/overmap.h b/src/overmap.h index ea073bd758f11..0939928032c5e 100644 --- a/src/overmap.h +++ b/src/overmap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_H -#define OVERMAP_H +#ifndef CATA_SRC_OVERMAP_H +#define CATA_SRC_OVERMAP_H #include #include @@ -528,4 +528,4 @@ int oter_get_rotation( const oter_id &oter ); * Return the directional suffix or "" if there isn't one. */ std::string oter_get_rotation_string( const oter_id &oter ); -#endif +#endif // CATA_SRC_OVERMAP_H diff --git a/src/overmap_connection.h b/src/overmap_connection.h index 4256a822acb99..03cf98a09ea9b 100644 --- a/src/overmap_connection.h +++ b/src/overmap_connection.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_CONNECTION_H -#define OVERMAP_CONNECTION_H +#ifndef CATA_SRC_OVERMAP_CONNECTION_H +#define CATA_SRC_OVERMAP_CONNECTION_H #include #include @@ -85,4 +85,4 @@ string_id guess_for( const int_id &oter_id ); } // namespace overmap_connections -#endif // OVERMAP_CONNECTION_H +#endif // CATA_SRC_OVERMAP_CONNECTION_H diff --git a/src/overmap_location.h b/src/overmap_location.h index 701af8f2e9143..415945fbc5faa 100644 --- a/src/overmap_location.h +++ b/src/overmap_location.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_LOCATION_H -#define OVERMAP_LOCATION_H +#ifndef CATA_SRC_OVERMAP_LOCATION_H +#define CATA_SRC_OVERMAP_LOCATION_H #include #include @@ -47,4 +47,4 @@ void finalize(); } // namespace overmap_locations -#endif // OVERMAP_LOCATION_H +#endif // CATA_SRC_OVERMAP_LOCATION_H diff --git a/src/overmap_noise.h b/src/overmap_noise.h index 8215e4ae99b40..efbb18fe812b0 100644 --- a/src/overmap_noise.h +++ b/src/overmap_noise.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_NOISE_H -#define OVERMAP_NOISE_H +#ifndef CATA_SRC_OVERMAP_NOISE_H +#define CATA_SRC_OVERMAP_NOISE_H #include "game_constants.h" #include "point.h" @@ -79,4 +79,4 @@ class om_noise_layer_lake : public om_noise_layer } // namespace om_noise -#endif +#endif // CATA_SRC_OVERMAP_NOISE_H diff --git a/src/overmap_types.h b/src/overmap_types.h index f5ad07cf7dc6d..d4daa6f20e178 100644 --- a/src/overmap_types.h +++ b/src/overmap_types.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_TYPES_H -#define OVERMAP_TYPES_H +#ifndef CATA_SRC_OVERMAP_TYPES_H +#define CATA_SRC_OVERMAP_TYPES_H #include "calendar.h" @@ -16,4 +16,4 @@ class scent_trace int initial_strength; // Original strength, doesn't weaken, it's just adjusted by age. }; -#endif +#endif // CATA_SRC_OVERMAP_TYPES_H diff --git a/src/overmap_ui.h b/src/overmap_ui.h index da2a9d4042a83..19388a6ab2b52 100644 --- a/src/overmap_ui.h +++ b/src/overmap_ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAP_UI_H -#define OVERMAP_UI_H +#ifndef CATA_SRC_OVERMAP_UI_H +#define CATA_SRC_OVERMAP_UI_H #include "point.h" @@ -95,4 +95,4 @@ void draw( const catacurses::window &w, const catacurses::window &wbar, const tr const draw_data_t &data ); void create_note( const tripoint &curs ); } // namespace overmap_ui -#endif /* OVERMAP_UI_H */ +#endif // CATA_SRC_OVERMAP_UI_H diff --git a/src/overmapbuffer.h b/src/overmapbuffer.h index a6a587bf7d9c4..f716106ff8130 100644 --- a/src/overmapbuffer.h +++ b/src/overmapbuffer.h @@ -1,6 +1,6 @@ #pragma once -#ifndef OVERMAPBUFFER_H -#define OVERMAPBUFFER_H +#ifndef CATA_SRC_OVERMAPBUFFER_H +#define CATA_SRC_OVERMAPBUFFER_H #include #include @@ -530,4 +530,4 @@ class overmapbuffer extern overmapbuffer overmap_buffer; -#endif +#endif // CATA_SRC_OVERMAPBUFFER_H diff --git a/src/panels.h b/src/panels.h index 63554ad27bc3f..c9e0e21360feb 100644 --- a/src/panels.h +++ b/src/panels.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PANELS_H -#define PANELS_H +#ifndef CATA_SRC_PANELS_H +#define CATA_SRC_PANELS_H #include #include @@ -98,4 +98,4 @@ class panel_manager }; -#endif //PANELS_H +#endif // CATA_SRC_PANELS_H diff --git a/src/path_info.h b/src/path_info.h index c5766f9af8b34..50dee5ee4c8c2 100644 --- a/src/path_info.h +++ b/src/path_info.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PATH_INFO_H -#define PATH_INFO_H +#ifndef CATA_SRC_PATH_INFO_H +#define CATA_SRC_PATH_INFO_H #include @@ -81,4 +81,4 @@ void set_motd( const std::string &motd ); } // namespace PATH_INFO -#endif +#endif // CATA_SRC_PATH_INFO_H diff --git a/src/pathfinding.h b/src/pathfinding.h old mode 100755 new mode 100644 index a54b56cbd0b00..0d1726bd4b1fc --- a/src/pathfinding.h +++ b/src/pathfinding.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PATHFINDING_H -#define PATHFINDING_H +#ifndef CATA_SRC_PATHFINDING_H +#define CATA_SRC_PATHFINDING_H #include "game_constants.h" @@ -72,4 +72,4 @@ struct pathfinding_settings { avoid_sharp( as ) {} }; -#endif +#endif // CATA_SRC_PATHFINDING_H diff --git a/src/pickup.h b/src/pickup.h index 387efeda01423..18601d9f20749 100644 --- a/src/pickup.h +++ b/src/pickup.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PICKUP_H -#define PICKUP_H +#ifndef CATA_SRC_PICKUP_H +#define CATA_SRC_PICKUP_H #include @@ -44,4 +44,4 @@ int cost_to_move_item( const Character &who, const item &it ); bool handle_spillable_contents( Character &c, item &it, map &m ); } // namespace Pickup -#endif +#endif // CATA_SRC_PICKUP_H diff --git a/src/pimpl.h b/src/pimpl.h index 18e73d91cd536..f09d39eb03763 100644 --- a/src/pimpl.h +++ b/src/pimpl.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PIMPL_H -#define PIMPL_H +#ifndef CATA_SRC_PIMPL_H +#define CATA_SRC_PIMPL_H #include #include @@ -75,4 +75,4 @@ class pimpl : private std::unique_ptr } }; -#endif +#endif // CATA_SRC_PIMPL_H diff --git a/src/pixel_minimap.h b/src/pixel_minimap.h index f616026db7397..a3505ca3b6ec3 100644 --- a/src/pixel_minimap.h +++ b/src/pixel_minimap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MINIMAP_H -#define MINIMAP_H +#ifndef CATA_SRC_PIXEL_MINIMAP_H +#define CATA_SRC_PIXEL_MINIMAP_H #include #include @@ -90,4 +90,4 @@ class pixel_minimap std::map cache; }; -#endif // MINIMAP_H +#endif // CATA_SRC_PIXEL_MINIMAP_H diff --git a/src/pixel_minimap_projectors.h b/src/pixel_minimap_projectors.h index 25180cc090416..187abec7d147a 100644 --- a/src/pixel_minimap_projectors.h +++ b/src/pixel_minimap_projectors.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PIXEL_MINIMAP_PROJECTORS_H -#define PIXEL_MINIMAP_PROJECTORS_H +#ifndef CATA_SRC_PIXEL_MINIMAP_PROJECTORS_H +#define CATA_SRC_PIXEL_MINIMAP_PROJECTORS_H #include "point.h" #include "sdl_wrappers.h" @@ -53,4 +53,4 @@ class pixel_minimap_iso_projector : public pixel_minimap_projector point tile_size; }; -#endif // PIXEL_MINIMAP_PROJECTORS_H +#endif // CATA_SRC_PIXEL_MINIMAP_PROJECTORS_H diff --git a/src/player.h b/src/player.h index 7ce68784965c5..88c8ddbc3426a 100644 --- a/src/player.h +++ b/src/player.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PLAYER_H -#define PLAYER_H +#ifndef CATA_SRC_PLAYER_H +#define CATA_SRC_PLAYER_H #include #include @@ -1050,4 +1050,4 @@ class player : public Character mutable decltype( _skills ) valid_autolearn_skills; }; -#endif +#endif // CATA_SRC_PLAYER_H diff --git a/src/player_activity.h b/src/player_activity.h index 8a89400f72e94..04162d98de5df 100644 --- a/src/player_activity.h +++ b/src/player_activity.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PLAYER_ACTIVITY_H -#define PLAYER_ACTIVITY_H +#ifndef CATA_SRC_PLAYER_ACTIVITY_H +#define CATA_SRC_PLAYER_ACTIVITY_H #include #include @@ -141,4 +141,4 @@ class player_activity void inherit_distractions( const player_activity & ); }; -#endif +#endif // CATA_SRC_PLAYER_ACTIVITY_H diff --git a/src/pldata.h b/src/pldata.h index 568578cfb3276..4b78a187fef2c 100644 --- a/src/pldata.h +++ b/src/pldata.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PLDATA_H -#define PLDATA_H +#ifndef CATA_SRC_PLDATA_H +#define CATA_SRC_PLDATA_H #include @@ -62,4 +62,4 @@ class addiction void deserialize( JsonIn &jsin ); }; -#endif +#endif // CATA_SRC_PLDATA_H diff --git a/src/point.h b/src/point.h index f3de6f5a59c6a..09a94c3e755ca 100644 --- a/src/point.h +++ b/src/point.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_POINT_H -#define CATA_POINT_H +#ifndef CATA_SRC_POINT_H +#define CATA_SRC_POINT_H // The CATA_NO_STL macro is used by the cata clang-tidy plugin tests so they // can include this header when compiling with -nostdinc++ @@ -396,4 +396,4 @@ static const std::array eight_horizontal_neighbors = { { #endif // CATA_NO_STL -#endif // CATA_POINT_H +#endif // CATA_SRC_POINT_H diff --git a/src/popup.h b/src/popup.h index 188e0919eaff9..6a28cba765f60 100644 --- a/src/popup.h +++ b/src/popup.h @@ -1,6 +1,6 @@ #pragma once -#ifndef POPUP_H -#define POPUP_H +#ifndef CATA_SRC_POPUP_H +#define CATA_SRC_POPUP_H #include #include @@ -280,4 +280,4 @@ class static_popup : public query_popup std::shared_ptr ui; }; -#endif +#endif // CATA_SRC_POPUP_H diff --git a/src/posix_time.h b/src/posix_time.h index 6e4a2ee808bf3..e38d1426554cf 100644 --- a/src/posix_time.h +++ b/src/posix_time.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TIME_SPEC_H -#define TIME_SPEC_H +#ifndef CATA_SRC_POSIX_TIME_H +#define CATA_SRC_POSIX_TIME_H // Compatibility header. On POSIX, just include . On Windows, provide // our own nanosleep implementation. @@ -48,4 +48,4 @@ nanosleep( const struct timespec *requested_delay, struct timespec *remaining_delay ); #endif -#endif +#endif // CATA_SRC_POSIX_TIME_H diff --git a/src/profession.h b/src/profession.h index 09d3f8dbaac48..09b47bfde00c5 100644 --- a/src/profession.h +++ b/src/profession.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PROFESSION_H -#define PROFESSION_H +#ifndef CATA_SRC_PROFESSION_H +#define CATA_SRC_PROFESSION_H #include #include @@ -134,4 +134,4 @@ class profession std::set get_forbidden_traits() const; }; -#endif +#endif // CATA_SRC_PROFESSION_H diff --git a/src/projectile.h b/src/projectile.h index f1dfd894606b1..008e4030c1fc0 100644 --- a/src/projectile.h +++ b/src/projectile.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PROJECTILE_H -#define PROJECTILE_H +#ifndef CATA_SRC_PROJECTILE_H +#define CATA_SRC_PROJECTILE_H #include #include @@ -61,4 +61,4 @@ struct dealt_projectile_attack { void apply_ammo_effects( const tripoint &p, const std::set &effects ); int max_aoe_size( const std::set &tags ); -#endif +#endif // CATA_SRC_PROJECTILE_H diff --git a/src/ranged.h b/src/ranged.h index 18d3c64ae1219..ceef5552ca208 100644 --- a/src/ranged.h +++ b/src/ranged.h @@ -1,5 +1,5 @@ -#ifndef RANGED_H -#define RANGED_H +#ifndef CATA_SRC_RANGED_H +#define CATA_SRC_RANGED_H #include @@ -111,4 +111,4 @@ class target_handler int range_with_even_chance_of_good_hit( int dispersion ); -#endif // RANGED_H +#endif // CATA_SRC_RANGED_H diff --git a/src/recipe.h b/src/recipe.h index f27a52a0256e0..cf7fdac5ade91 100644 --- a/src/recipe.h +++ b/src/recipe.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RECIPE_H -#define RECIPE_H +#ifndef CATA_SRC_RECIPE_H +#define CATA_SRC_RECIPE_H #include #include @@ -226,4 +226,4 @@ class recipe std::vector> reqs_blueprint; }; -#endif // RECIPE_H +#endif // CATA_SRC_RECIPE_H diff --git a/src/recipe_dictionary.h b/src/recipe_dictionary.h index 9e9ab4ee6d8f6..a9667404e0c61 100644 --- a/src/recipe_dictionary.h +++ b/src/recipe_dictionary.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RECIPE_DICTIONARY_H -#define RECIPE_DICTIONARY_H +#ifndef CATA_SRC_RECIPE_DICTIONARY_H +#define CATA_SRC_RECIPE_DICTIONARY_H #include #include @@ -186,4 +186,4 @@ class recipe_subset void serialize( const recipe_subset &value, JsonOut &jsout ); void deserialize( recipe_subset &value, JsonIn &jsin ); -#endif +#endif // CATA_SRC_RECIPE_DICTIONARY_H diff --git a/src/recipe_groups.h b/src/recipe_groups.h index 34ed49d565646..32d442212a2c7 100644 --- a/src/recipe_groups.h +++ b/src/recipe_groups.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RECIPE_GROUPS_H -#define RECIPE_GROUPS_H +#ifndef CATA_SRC_RECIPE_GROUPS_H +#define CATA_SRC_RECIPE_GROUPS_H #include #include @@ -22,4 +22,4 @@ std::map get_recipes_by_id( const std::string &id, const std::string &om_terrain_id = "ANY" ); } // namespace recipe_group -#endif +#endif // CATA_SRC_RECIPE_GROUPS_H diff --git a/src/rect_range.h b/src/rect_range.h index 451e23c242536..bb93a38f598e0 100644 --- a/src/rect_range.h +++ b/src/rect_range.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RECT_RANGE_H -#define RECT_RANGE_H +#ifndef CATA_SRC_RECT_RANGE_H +#define CATA_SRC_RECT_RANGE_H // This is a template parameter, it's usually SDL_Rect, but that way the class // can be used without include any SDL header. @@ -59,4 +59,4 @@ class rect_range } }; -#endif +#endif // CATA_SRC_RECT_RANGE_H diff --git a/src/regional_settings.h b/src/regional_settings.h index 2930fd17f44d4..824735e1b80d0 100644 --- a/src/regional_settings.h +++ b/src/regional_settings.h @@ -1,6 +1,6 @@ #pragma once -#ifndef REGIONAL_SETTINGS_H -#define REGIONAL_SETTINGS_H +#ifndef CATA_SRC_REGIONAL_SETTINGS_H +#define CATA_SRC_REGIONAL_SETTINGS_H #include #include @@ -258,4 +258,4 @@ void reset_region_settings(); void load_region_overlay( const JsonObject &jo ); void apply_region_overlay( const JsonObject &jo, regional_settings ®ion ); -#endif +#endif // CATA_SRC_REGIONAL_SETTINGS_H diff --git a/src/relic.h b/src/relic.h index 6a89295c807ab..fda75a1c19f3e 100644 --- a/src/relic.h +++ b/src/relic.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RELIC_H -#define RELIC_H +#ifndef CATA_SRC_RELIC_H +#define CATA_SRC_RELIC_H #include #include @@ -45,4 +45,4 @@ class relic int modify_value( enchantment::mod value_type, int value ) const; }; -#endif // !RELIC_H +#endif // CATA_SRC_RELIC_H diff --git a/src/requirements.h b/src/requirements.h index 835fad3c7a113..b38a5a3b8a2c1 100644 --- a/src/requirements.h +++ b/src/requirements.h @@ -1,6 +1,6 @@ #pragma once -#ifndef REQUIREMENTS_H -#define REQUIREMENTS_H +#ifndef CATA_SRC_REQUIREMENTS_H +#define CATA_SRC_REQUIREMENTS_H #include #include @@ -457,4 +457,4 @@ class deduped_requirement_data std::vector alternatives_; }; -#endif +#endif // CATA_SRC_REQUIREMENTS_H diff --git a/src/ret_val.h b/src/ret_val.h index 6eebd086939cf..024ddbec7b786 100644 --- a/src/ret_val.h +++ b/src/ret_val.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RET_VAL_H -#define RET_VAL_H +#ifndef CATA_SRC_RET_VAL_H +#define CATA_SRC_RET_VAL_H #include #include @@ -98,4 +98,4 @@ struct ret_val::default_success : public std::integral_constant struct ret_val::default_failure : public std::integral_constant {}; -#endif // RET_VAL_H +#endif // CATA_SRC_RET_VAL_H diff --git a/src/rng.h b/src/rng.h index 3fda3c67c2034..b4c07aa7e7b55 100644 --- a/src/rng.h +++ b/src/rng.h @@ -1,6 +1,6 @@ #pragma once -#ifndef RNG_H -#define RNG_H +#ifndef CATA_SRC_RNG_H +#define CATA_SRC_RNG_H #include #include @@ -172,4 +172,4 @@ cata::optional random_point( const tripoint_range &range, cata::optional random_point( const map &m, const std::function &predicate ); -#endif +#endif // CATA_SRC_RNG_H diff --git a/src/rotatable_symbols.h b/src/rotatable_symbols.h index e908ba208bd6d..02d9d9d18e8b8 100644 --- a/src/rotatable_symbols.h +++ b/src/rotatable_symbols.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ROTATABLE_SYMBOLS_H -#define ROTATABLE_SYMBOLS_H +#ifndef CATA_SRC_ROTATABLE_SYMBOLS_H +#define CATA_SRC_ROTATABLE_SYMBOLS_H #include #include @@ -21,4 +21,4 @@ uint32_t get( const uint32_t &symbol, int n ); } // namespace rotatable_symbols -#endif // ROTATABLE_SYMBOLS_H +#endif // CATA_SRC_ROTATABLE_SYMBOLS_H diff --git a/src/safe_reference.h b/src/safe_reference.h index 8392abb3d9c69..5e235e0af9a9e 100644 --- a/src/safe_reference.h +++ b/src/safe_reference.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_SAFE_REFERENCE_H -#define CATA_SAFE_REFERENCE_H +#ifndef CATA_SRC_SAFE_REFERENCE_H +#define CATA_SRC_SAFE_REFERENCE_H /** A pair of classes to provide safe references to objects. @@ -70,4 +70,4 @@ class safe_reference_anchor std::shared_ptr impl; }; -#endif // CATA_SAFE_REFERENCE_H +#endif // CATA_SRC_SAFE_REFERENCE_H diff --git a/src/safemode_ui.h b/src/safemode_ui.h index bbb037ba8927f..3557d0b617292 100644 --- a/src/safemode_ui.h +++ b/src/safemode_ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SAFEMODE_UI_H -#define SAFEMODE_UI_H +#ifndef CATA_SRC_SAFEMODE_UI_H +#define CATA_SRC_SAFEMODE_UI_H #include #include @@ -114,4 +114,4 @@ class safemode safemode &get_safemode(); -#endif +#endif // CATA_SRC_SAFEMODE_UI_H diff --git a/src/scenario.h b/src/scenario.h index 1ba4a8da6c4b3..2fc31f8693ec5 100644 --- a/src/scenario.h +++ b/src/scenario.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SCENARIO_H -#define SCENARIO_H +#ifndef CATA_SRC_SCENARIO_H +#define CATA_SRC_SCENARIO_H #include #include @@ -125,4 +125,4 @@ struct scen_blacklist { void reset_scenarios_blacklist(); -#endif +#endif // CATA_SRC_SCENARIO_H diff --git a/src/scent_block.h b/src/scent_block.h index be9c956c443b0..09ee1d662f49e 100644 --- a/src/scent_block.h +++ b/src/scent_block.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SCENT_BLOCK_H -#define SCENT_BLOCK_H +#ifndef CATA_SRC_SCENT_BLOCK_H +#define CATA_SRC_SCENT_BLOCK_H #include #include @@ -102,4 +102,4 @@ struct scent_block { } }; -#endif +#endif // CATA_SRC_SCENT_BLOCK_H diff --git a/src/scent_map.h b/src/scent_map.h index d610081d4f7dc..55209d65201e5 100644 --- a/src/scent_map.h +++ b/src/scent_map.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SCENT_H -#define SCENT_H +#ifndef CATA_SRC_SCENT_MAP_H +#define CATA_SRC_SCENT_MAP_H #include #include @@ -85,4 +85,4 @@ class scent_map } }; -#endif +#endif // CATA_SRC_SCENT_MAP_H diff --git a/src/scores_ui.h b/src/scores_ui.h index 7ff135241b86c..b5d92473c809e 100644 --- a/src/scores_ui.h +++ b/src/scores_ui.h @@ -1,9 +1,9 @@ -#ifndef CATA_SCORES_UI_HPP -#define CATA_SCORES_UI_HPP +#ifndef CATA_SRC_SCORES_UI_H +#define CATA_SRC_SCORES_UI_H class kill_tracker; class stats_tracker; void show_scores_ui( stats_tracker &, const kill_tracker & ); -#endif // CATA_SCORES_UI_HPP +#endif // CATA_SRC_SCORES_UI_H diff --git a/src/sdl_utils.h b/src/sdl_utils.h index 7b106c47b18c2..6958af151cba7 100644 --- a/src/sdl_utils.h +++ b/src/sdl_utils.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SDL_UTILS_H -#define SDL_UTILS_H +#ifndef CATA_SRC_SDL_UTILS_H +#define CATA_SRC_SDL_UTILS_H #include #include @@ -169,4 +169,4 @@ SDL_Rect fit_rect_inside( const SDL_Rect &inner, const SDL_Rect &outer ); std::vector color_linear_interpolate( const SDL_Color &start_color, const SDL_Color &end_color, unsigned additional_steps ); -#endif // SDL_UTILS_H +#endif // CATA_SRC_SDL_UTILS_H diff --git a/src/sdl_wrappers.h b/src/sdl_wrappers.h index 2e56e6cef4162..c42389c2830a1 100644 --- a/src/sdl_wrappers.h +++ b/src/sdl_wrappers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SDL_WRAPPERS_H -#define SDL_WRAPPERS_H +#ifndef CATA_SRC_SDL_WRAPPERS_H +#define CATA_SRC_SDL_WRAPPERS_H // IWYU pragma: begin_exports #if defined(_MSC_VER) && defined(USE_VCPKG) @@ -135,4 +135,4 @@ inline bool operator!=( const SDL_Rect &lhs, const SDL_Rect &rhs ) /**@}*/ -#endif +#endif // CATA_SRC_SDL_WRAPPERS_H diff --git a/src/sdlsound.h b/src/sdlsound.h index 8c4ed14d31553..813c81ad7e3e6 100644 --- a/src/sdlsound.h +++ b/src/sdlsound.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SDL_SOUND_H -#define SDL_SOUND_H +#ifndef CATA_SRC_SDLSOUND_H +#define CATA_SRC_SDLSOUND_H #include #if defined(SDL_SOUND) @@ -30,4 +30,4 @@ inline void load_soundset() { } #endif -#endif +#endif // CATA_SRC_SDLSOUND_H diff --git a/src/sdltiles.h b/src/sdltiles.h index 433561148e03d..34a3e457d78c9 100644 --- a/src/sdltiles.h +++ b/src/sdltiles.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_SDLTILES_H -#define CATA_SDLTILES_H +#ifndef CATA_SRC_SDLTILES_H +#define CATA_SRC_SDLTILES_H #include #if defined(TILES) @@ -42,4 +42,4 @@ window_dimensions get_window_dimensions( const catacurses::window &win ); #endif // TILES -#endif // CATA_SDLTILES_H +#endif // CATA_SRC_SDLTILES_H diff --git a/src/shadowcasting.h b/src/shadowcasting.h index af891a9e200b5..6538cecdce612 100644 --- a/src/shadowcasting.h +++ b/src/shadowcasting.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SHADOWCASTING_H -#define SHADOWCASTING_H +#ifndef CATA_SRC_SHADOWCASTING_H +#define CATA_SRC_SHADOWCASTING_H #include #include @@ -123,4 +123,4 @@ void cast_zlight( const array_of_grids_of &floor_caches, const tripoint &origin, int offset_distance, T numerator ); -#endif +#endif // CATA_SRC_SHADOWCASTING_H diff --git a/src/simple_pathfinding.h b/src/simple_pathfinding.h index 31b3c5becc8f9..260a9608f76f4 100644 --- a/src/simple_pathfinding.h +++ b/src/simple_pathfinding.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SIMPLE_PATHFINDINDING_H -#define SIMPLE_PATHFINDINDING_H +#ifndef CATA_SRC_SIMPLE_PATHFINDING_H +#define CATA_SRC_SIMPLE_PATHFINDING_H #include #include @@ -183,4 +183,4 @@ inline path straight_path( const point &source, } // namespace pf -#endif +#endif // CATA_SRC_SIMPLE_PATHFINDING_H diff --git a/src/simplexnoise.h b/src/simplexnoise.h index c233b9624b34f..5688f9c1141c9 100644 --- a/src/simplexnoise.h +++ b/src/simplexnoise.h @@ -16,8 +16,8 @@ * */ -#ifndef SIMPLEX_H -#define SIMPLEX_H +#ifndef CATA_SRC_SIMPLEXNOISE_H +#define CATA_SRC_SIMPLEXNOISE_H /* 2D, 3D and 4D Simplex Noise functions return 'random' values in (-1, 1). @@ -181,4 +181,4 @@ static const int simplex[64][4] = { {2, 1, 0, 3}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {3, 1, 0, 2}, {0, 0, 0, 0}, {3, 2, 0, 1}, {3, 2, 1, 0} }; -#endif +#endif // CATA_SRC_SIMPLEXNOISE_H diff --git a/src/skill.h b/src/skill.h index af5e4cee4094e..d5849c5171d19 100644 --- a/src/skill.h +++ b/src/skill.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SKILL_H -#define SKILL_H +#ifndef CATA_SRC_SKILL_H +#define CATA_SRC_SKILL_H #include #include @@ -249,4 +249,4 @@ class SkillDisplayType double price_adjustment( int ); -#endif +#endif // CATA_SRC_SKILL_H diff --git a/src/skill_boost.h b/src/skill_boost.h index 471006c9626fb..796a795c43ebb 100644 --- a/src/skill_boost.h +++ b/src/skill_boost.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SKILL_BOOST_H -#define SKILL_BOOST_H +#ifndef CATA_SRC_SKILL_BOOST_H +#define CATA_SRC_SKILL_BOOST_H #include #include @@ -39,4 +39,4 @@ class skill_boost void load( const JsonObject &jo, const std::string &src ); }; -#endif +#endif // CATA_SRC_SKILL_BOOST_H diff --git a/src/sounds.h b/src/sounds.h index 59e8fdd55b6b8..1420f41702410 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SOUNDS_H -#define SOUNDS_H +#ifndef CATA_SRC_SOUNDS_H +#define CATA_SRC_SOUNDS_H #include #include @@ -163,4 +163,4 @@ void do_fatigue(); void do_obstacle( const std::string &obst = "" ); } // namespace sfx -#endif +#endif // CATA_SRC_SOUNDS_H diff --git a/src/speech.h b/src/speech.h index a08408ef8748b..984e819a39d96 100644 --- a/src/speech.h +++ b/src/speech.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SPEECH_H -#define SPEECH_H +#ifndef CATA_SRC_SPEECH_H +#define CATA_SRC_SPEECH_H #include "translations.h" @@ -17,4 +17,4 @@ void load_speech( const JsonObject &jo ); void reset_speech(); const SpeechBubble &get_speech( const std::string &label ); -#endif +#endif // CATA_SRC_SPEECH_H diff --git a/src/start_location.h b/src/start_location.h index f1c5c8417e7ab..d28829d4bbb5b 100644 --- a/src/start_location.h +++ b/src/start_location.h @@ -1,6 +1,6 @@ #pragma once -#ifndef START_LOCATION_H -#define START_LOCATION_H +#ifndef CATA_SRC_START_LOCATION_H +#define CATA_SRC_START_LOCATION_H #include #include @@ -89,4 +89,4 @@ const std::vector &get_all(); } // namespace start_locations -#endif // START_LOCATION_H +#endif // CATA_SRC_START_LOCATION_H diff --git a/src/stats_tracker.h b/src/stats_tracker.h index 5819f7dc380d1..748820a03dd9e 100644 --- a/src/stats_tracker.h +++ b/src/stats_tracker.h @@ -1,5 +1,5 @@ -#ifndef CATA_STATS_TRACKER_H -#define CATA_STATS_TRACKER_H +#ifndef CATA_SRC_STATS_TRACKER_H +#define CATA_SRC_STATS_TRACKER_H #include #include @@ -152,4 +152,4 @@ class stats_tracker : public event_subscriber std::unordered_set> initial_scores; }; -#endif // CATA_STATS_TRACKER_H +#endif // CATA_SRC_STATS_TRACKER_H diff --git a/src/stomach.h b/src/stomach.h index 502450808c772..47878018c23a8 100644 --- a/src/stomach.h +++ b/src/stomach.h @@ -1,4 +1,6 @@ #pragma once +#ifndef CATA_SRC_STOMACH_H +#define CATA_SRC_STOMACH_H #include @@ -171,3 +173,5 @@ class stomach_contents const Character &owner ); }; + +#endif // CATA_SRC_STOMACH_H diff --git a/src/string_formatter.h b/src/string_formatter.h index 0390eaed33700..5c9220470dbf8 100644 --- a/src/string_formatter.h +++ b/src/string_formatter.h @@ -1,6 +1,6 @@ #pragma once -#ifndef STRING_FORMATTER_H -#define STRING_FORMATTER_H +#ifndef CATA_SRC_STRING_FORMATTER_H +#define CATA_SRC_STRING_FORMATTER_H #include #include @@ -425,4 +425,4 @@ string_format( T &&format, Args &&...args ) } /**@}*/ -#endif +#endif // CATA_SRC_STRING_FORMATTER_H diff --git a/src/string_id.h b/src/string_id.h index 5b2a396f89ca9..7eb3cb0373f66 100644 --- a/src/string_id.h +++ b/src/string_id.h @@ -1,6 +1,6 @@ #pragma once -#ifndef STRING_ID_H -#define STRING_ID_H +#ifndef CATA_SRC_STRING_ID_H +#define CATA_SRC_STRING_ID_H #include #include @@ -208,4 +208,4 @@ struct hash< string_id > { }; } // namespace std -#endif +#endif // CATA_SRC_STRING_ID_H diff --git a/src/string_input_popup.h b/src/string_input_popup.h index 4eba691e54526..a6511ed8c253a 100644 --- a/src/string_input_popup.h +++ b/src/string_input_popup.h @@ -1,6 +1,6 @@ #pragma once -#ifndef STRING_INPUT_POPUP_H -#define STRING_INPUT_POPUP_H +#ifndef CATA_SRC_STRING_INPUT_POPUP_H +#define CATA_SRC_STRING_INPUT_POPUP_H #include #include @@ -266,4 +266,4 @@ class string_input_popup // NOLINT(cata-xy) std::map> callbacks; }; -#endif +#endif // CATA_SRC_STRING_INPUT_POPUP_H diff --git a/src/submap.h b/src/submap.h index eae96c631b960..ad0e510647817 100644 --- a/src/submap.h +++ b/src/submap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef SUBMAP_H -#define SUBMAP_H +#ifndef CATA_SRC_SUBMAP_H +#define CATA_SRC_SUBMAP_H #include #include @@ -349,4 +349,4 @@ struct maptile { } }; -#endif +#endif // CATA_SRC_SUBMAP_H diff --git a/src/teleport.h b/src/teleport.h index 7e5ada5a9210b..f6293315497b5 100644 --- a/src/teleport.h +++ b/src/teleport.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TELEPORT_H -#define TELEPORT_H +#ifndef CATA_SRC_TELEPORT_H +#define CATA_SRC_TELEPORT_H class Creature; @@ -14,4 +14,4 @@ bool teleport( Creature &critter, int min_distance = 2, int max_distance = 12, bool add_teleglow = true ); } // namespace teleport -#endif +#endif // CATA_SRC_TELEPORT_H diff --git a/src/text_snippets.h b/src/text_snippets.h index c7348e87b90da..ad1e16b2a484b 100644 --- a/src/text_snippets.h +++ b/src/text_snippets.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TEXT_SNIPPETS_H -#define TEXT_SNIPPETS_H +#ifndef CATA_SRC_TEXT_SNIPPETS_H +#define CATA_SRC_TEXT_SNIPPETS_H #include #include @@ -114,4 +114,4 @@ class snippet_library extern snippet_library SNIPPET; -#endif +#endif // CATA_SRC_TEXT_SNIPPETS_H diff --git a/src/text_style_check.h b/src/text_style_check.h index 853ca0f01f653..2d91207843f8a 100644 --- a/src/text_style_check.h +++ b/src/text_style_check.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TEXT_STYLE_CHECK_H -#define TEXT_STYLE_CHECK_H +#ifndef CATA_SRC_TEXT_STYLE_CHECK_H +#define CATA_SRC_TEXT_STYLE_CHECK_H // This is used in both the game itself and the clang-tidy check, // so only system headers should be included here. @@ -199,4 +199,4 @@ void text_style_check( Iter beg, Iter end, } } -#endif // TEXT_STYLE_CHECK +#endif // CATA_SRC_TEXT_STYLE_CHECK_H diff --git a/src/tileray.h b/src/tileray.h index 03506ff008f95..2eb7e99c5f07f 100644 --- a/src/tileray.h +++ b/src/tileray.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TILERAY_H -#define TILERAY_H +#ifndef CATA_SRC_TILERAY_H +#define CATA_SRC_TILERAY_H #include "point.h" @@ -58,4 +58,4 @@ class tileray bool end(); // do we reach the end of (dx,dy) defined ray? }; -#endif +#endif // CATA_SRC_TILERAY_H diff --git a/src/timed_event.h b/src/timed_event.h index a3a2a6b7820ab..7b43fa5bd7b75 100644 --- a/src/timed_event.h +++ b/src/timed_event.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TIMED_EVENT_H -#define TIMED_EVENT_H +#ifndef CATA_SRC_TIMED_EVENT_H +#define CATA_SRC_TIMED_EVENT_H #include @@ -66,4 +66,4 @@ class timed_event_manager void process(); }; -#endif +#endif // CATA_SRC_TIMED_EVENT_H diff --git a/src/trait_group.h b/src/trait_group.h index 1423604b79833..c6993439acc80 100644 --- a/src/trait_group.h +++ b/src/trait_group.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TRAIT_GROUP_H -#define TRAIT_GROUP_H +#ifndef CATA_SRC_TRAIT_GROUP_H +#define CATA_SRC_TRAIT_GROUP_H #include #include @@ -201,4 +201,4 @@ class Trait_group_distribution : public Trait_group void add_entry( std::unique_ptr ptr ) override; }; -#endif +#endif // CATA_SRC_TRAIT_GROUP_H diff --git a/src/translations.h b/src/translations.h index d2a0dfa83db5e..68eed6ab126c3 100644 --- a/src/translations.h +++ b/src/translations.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TRANSLATIONS_H -#define TRANSLATIONS_H +#ifndef CATA_SRC_TRANSLATIONS_H +#define CATA_SRC_TRANSLATIONS_H #include #include @@ -244,4 +244,4 @@ std::string operator+( const translation &lhs, const std::string &rhs ); std::string operator+( const std::string &lhs, const translation &rhs ); std::string operator+( const translation &lhs, const translation &rhs ); -#endif // _TRANSLATIONS_H_ +#endif // CATA_SRC_TRANSLATIONS_H diff --git a/src/trap.h b/src/trap.h index 9505c2b1c4181..3d7691739f5f8 100644 --- a/src/trap.h +++ b/src/trap.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TRAP_H -#define TRAP_H +#ifndef CATA_SRC_TRAP_H +#define CATA_SRC_TRAP_H #include #include @@ -299,4 +299,4 @@ tr_shadow, tr_drain, tr_snake; -#endif +#endif // CATA_SRC_TRAP_H diff --git a/src/type_id.h b/src/type_id.h index ba5506a12f6e3..1a6431c82cd17 100644 --- a/src/type_id.h +++ b/src/type_id.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TYPE_ID_H -#define TYPE_ID_H +#ifndef CATA_SRC_TYPE_ID_H +#define CATA_SRC_TYPE_ID_H #include "int_id.h" #include "string_id.h" @@ -170,4 +170,4 @@ struct construction; using construction_id = int_id; using construction_str_id = string_id; -#endif // TYPE_ID_H +#endif // CATA_SRC_TYPE_ID_H diff --git a/src/ui.h b/src/ui.h index ece0cd5f1f8d8..b5c008e9dd4a9 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,6 +1,6 @@ #pragma once -#ifndef UI_H -#define UI_H +#ifndef CATA_SRC_UI_H +#define CATA_SRC_UI_H #include #include @@ -299,4 +299,4 @@ class pointmenu_cb : public uilist_callback void refresh( uilist *menu ) override; }; -#endif +#endif // CATA_SRC_UI_H diff --git a/src/ui_manager.h b/src/ui_manager.h index 9ada2fba5e28e..2ab2a41c24f7a 100644 --- a/src/ui_manager.h +++ b/src/ui_manager.h @@ -1,6 +1,6 @@ #pragma once -#ifndef UI_MANAGER_H -#define UI_MANAGER_H +#ifndef CATA_SRC_UI_MANAGER_H +#define CATA_SRC_UI_MANAGER_H #include @@ -94,4 +94,4 @@ void redraw(); void screen_resized(); } // namespace ui_manager -#endif +#endif // CATA_SRC_UI_MANAGER_H diff --git a/src/uistate.h b/src/uistate.h index 355ec4c947e35..e673a92996bee 100644 --- a/src/uistate.h +++ b/src/uistate.h @@ -1,6 +1,6 @@ #pragma once -#ifndef UISTATE_H -#define UISTATE_H +#ifndef CATA_SRC_UISTATE_H +#define CATA_SRC_UISTATE_H #include #include @@ -275,4 +275,4 @@ class uistatedata }; extern uistatedata uistate; -#endif +#endif // CATA_SRC_UISTATE_H diff --git a/src/units.h b/src/units.h index 505204be4a810..c457606ceccca 100644 --- a/src/units.h +++ b/src/units.h @@ -1,6 +1,6 @@ #pragma once -#ifndef UNITS_H -#define UNITS_H +#ifndef CATA_SRC_UNITS_H +#define CATA_SRC_UNITS_H #include #include @@ -775,4 +775,4 @@ void dump_to_json_string( T t, JsonOut &jsout, jsout.write( str ); } -#endif +#endif // CATA_SRC_UNITS_H diff --git a/src/value_ptr.h b/src/value_ptr.h index a89c894a915e1..a5fefb10c7317 100644 --- a/src/value_ptr.h +++ b/src/value_ptr.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_VALUE_PTR_H -#define CATA_VALUE_PTR_H +#ifndef CATA_SRC_VALUE_PTR_H +#define CATA_SRC_VALUE_PTR_H #include @@ -55,4 +55,4 @@ value_ptr make_value( Args &&...args ) } // namespace cata -#endif // CATA_VALUE_PTR_H +#endif // CATA_SRC_VALUE_PTR_H diff --git a/src/veh_interact.h b/src/veh_interact.h index 72b539bf365a3..2cb78e140d5d8 100644 --- a/src/veh_interact.h +++ b/src/veh_interact.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEH_INTERACT_H -#define VEH_INTERACT_H +#ifndef CATA_SRC_VEH_INTERACT_H +#define CATA_SRC_VEH_INTERACT_H #include #include @@ -225,4 +225,4 @@ class veh_interact bool can_self_jack(); }; -#endif +#endif // CATA_SRC_VEH_INTERACT_H diff --git a/src/veh_type.h b/src/veh_type.h index 2915c3e2ee046..271ca8e716c9a 100644 --- a/src/veh_type.h +++ b/src/veh_type.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEH_TYPE_H -#define VEH_TYPE_H +#ifndef CATA_SRC_VEH_TYPE_H +#define CATA_SRC_VEH_TYPE_H #include #include @@ -410,4 +410,4 @@ struct vehicle_prototype { static std::vector get_all(); }; -#endif +#endif // CATA_SRC_VEH_TYPE_H diff --git a/src/veh_utils.h b/src/veh_utils.h index 187598fc91ab1..3e9ffe974651a 100644 --- a/src/veh_utils.h +++ b/src/veh_utils.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEH_UTILS_H -#define VEH_UTILS_H +#ifndef CATA_SRC_VEH_UTILS_H +#define CATA_SRC_VEH_UTILS_H #include "type_id.h" @@ -28,4 +28,4 @@ vehicle_part &most_repairable_part( vehicle &veh, Character &who_arg, bool repair_part( vehicle &veh, vehicle_part &pt, Character &who ); } // namespace veh_utils -#endif +#endif // CATA_SRC_VEH_UTILS_H diff --git a/src/vehicle.h b/src/vehicle.h index 406bf2c79e0cb..a65823ad0492c 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEHICLE_H -#define VEHICLE_H +#ifndef CATA_SRC_VEHICLE_H +#define CATA_SRC_VEHICLE_H #include #include @@ -1903,4 +1903,4 @@ class vehicle unsigned char vehicle_noise = 0; }; -#endif +#endif // CATA_SRC_VEHICLE_H diff --git a/src/vehicle_group.h b/src/vehicle_group.h index b48efff66c5de..210c667d6f77f 100644 --- a/src/vehicle_group.h +++ b/src/vehicle_group.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEHICLE_GROUP_H -#define VEHICLE_GROUP_H +#ifndef CATA_SRC_VEHICLE_GROUP_H +#define CATA_SRC_VEHICLE_GROUP_H #include #include @@ -189,4 +189,4 @@ class VehicleSpawn static FunctionMap builtin_functions; }; -#endif +#endif // CATA_SRC_VEHICLE_GROUP_H diff --git a/src/vehicle_selector.h b/src/vehicle_selector.h index 620cedfbe7a2a..da6b81dabbf6b 100644 --- a/src/vehicle_selector.h +++ b/src/vehicle_selector.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VEHICLE_SELECTOR_H -#define VEHICLE_SELECTOR_H +#ifndef CATA_SRC_VEHICLE_SELECTOR_H +#define CATA_SRC_VEHICLE_SELECTOR_H #include #include @@ -92,4 +92,4 @@ class vehicle_selector : public visitable std::vector data; }; -#endif +#endif // CATA_SRC_VEHICLE_SELECTOR_H diff --git a/src/visitable.h b/src/visitable.h index ddfc4a4d4d126..40210068901ad 100644 --- a/src/visitable.h +++ b/src/visitable.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VISITABLE_H -#define VISITABLE_H +#ifndef CATA_SRC_VISITABLE_H +#define CATA_SRC_VISITABLE_H #include #include @@ -114,4 +114,4 @@ class visitable item remove_item( item &it ); }; -#endif +#endif // CATA_SRC_VISITABLE_H diff --git a/src/vitamin.h b/src/vitamin.h index f085297ece746..03cc84a2a0642 100644 --- a/src/vitamin.h +++ b/src/vitamin.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VITAMIN_H -#define VITAMIN_H +#ifndef CATA_SRC_VITAMIN_H +#define CATA_SRC_VITAMIN_H #include #include @@ -110,4 +110,4 @@ class vitamin std::set flags_; }; -#endif +#endif // CATA_SRC_VITAMIN_H diff --git a/src/vpart_position.h b/src/vpart_position.h index b2de2dc818be5..459def01884be 100644 --- a/src/vpart_position.h +++ b/src/vpart_position.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VPART_POSITION_H -#define VPART_POSITION_H +#ifndef CATA_SRC_VPART_POSITION_H +#define CATA_SRC_VPART_POSITION_H #include #include @@ -155,4 +155,4 @@ inline vehicle *veh_pointer_or_null( const optional_vpart_position &p ) return p ? &p->vehicle() : nullptr; } -#endif +#endif // CATA_SRC_VPART_POSITION_H diff --git a/src/vpart_range.h b/src/vpart_range.h index 90b517fa690ad..880c4e978c41f 100644 --- a/src/vpart_range.h +++ b/src/vpart_range.h @@ -1,6 +1,6 @@ #pragma once -#ifndef VPART_RANGE_H -#define VPART_RANGE_H +#ifndef CATA_SRC_VPART_RANGE_H +#define CATA_SRC_VPART_RANGE_H #include #include @@ -166,4 +166,4 @@ class vehicle_part_with_feature_range : public bool matches( size_t part ) const; }; -#endif +#endif // CATA_SRC_VPART_RANGE_H diff --git a/src/wcwidth.h b/src/wcwidth.h index a4eeeb1f9ebe2..ab8f651e027ab 100644 --- a/src/wcwidth.h +++ b/src/wcwidth.h @@ -1,6 +1,6 @@ #pragma once -#ifndef WCWIDTH_H -#define WCWIDTH_H +#ifndef CATA_SRC_WCWIDTH_H +#define CATA_SRC_WCWIDTH_H #include @@ -8,4 +8,4 @@ */ int mk_wcwidth( uint32_t ucs ); -#endif +#endif // CATA_SRC_WCWIDTH_H diff --git a/src/weather.h b/src/weather.h index 7c3d673d0e560..5bb269e145e0d 100644 --- a/src/weather.h +++ b/src/weather.h @@ -1,6 +1,6 @@ #pragma once -#ifndef WEATHER_H -#define WEATHER_H +#ifndef CATA_SRC_WEATHER_H +#define CATA_SRC_WEATHER_H #include "color.h" #include "optional.h" @@ -264,4 +264,4 @@ class weather_manager void clear_temp_cache(); }; -#endif +#endif // CATA_SRC_WEATHER_H diff --git a/src/weather_gen.h b/src/weather_gen.h index ab98d6eb199ff..9b269ec82cced 100644 --- a/src/weather_gen.h +++ b/src/weather_gen.h @@ -1,6 +1,6 @@ #pragma once -#ifndef WEATHER_GEN_H -#define WEATHER_GEN_H +#ifndef CATA_SRC_WEATHER_GEN_H +#define CATA_SRC_WEATHER_GEN_H #include @@ -67,4 +67,4 @@ class weather_generator static weather_generator load( const JsonObject &jo ); }; -#endif +#endif // CATA_SRC_WEATHER_GEN_H diff --git a/src/weighted_list.h b/src/weighted_list.h index 283f4b7a46f93..065986e498b8e 100644 --- a/src/weighted_list.h +++ b/src/weighted_list.h @@ -1,6 +1,6 @@ #pragma once -#ifndef WEIGHTED_LIST_H -#define WEIGHTED_LIST_H +#ifndef CATA_SRC_WEIGHTED_LIST_H +#define CATA_SRC_WEIGHTED_LIST_H #include "rng.h" @@ -245,4 +245,4 @@ template struct weighted_float_list : public weighted_list #include @@ -165,4 +165,4 @@ void load_external_option( const JsonObject &jo ); extern std::unique_ptr world_generator; -#endif +#endif // CATA_SRC_WORLDFACTORY_H diff --git a/tests/assertion_helpers.h b/tests/assertion_helpers.h index d4ceab956d835..b35d54f1bf433 100644 --- a/tests/assertion_helpers.h +++ b/tests/assertion_helpers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ASSERTION_HELPERS_H -#define ASSERTION_HELPERS_H +#ifndef CATA_TESTS_ASSERTION_HELPERS_H +#define CATA_TESTS_ASSERTION_HELPERS_H #include "catch/catch.hpp" @@ -15,4 +15,4 @@ void check_containers_equal( const Container1 &c1, const Container2 &c2 ) CHECK( std::equal( c1.begin(), c1.end(), c2.begin() ) ); } -#endif // ASSERTION_HELPERS_H +#endif // CATA_TESTS_ASSERTION_HELPERS_H diff --git a/tests/colony_list_test_helpers.h b/tests/colony_list_test_helpers.h index 47644b9a63049..57bed9ca10840 100644 --- a/tests/colony_list_test_helpers.h +++ b/tests/colony_list_test_helpers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef COLONY_LIST_TEST_HELPERS_H -#define COLONY_LIST_TEST_HELPERS_H +#ifndef CATA_TESTS_COLONY_LIST_TEST_HELPERS_H +#define CATA_TESTS_COLONY_LIST_TEST_HELPERS_H // Fast xorshift+128 random number generator function // original: https://codingforspeed.com/using-faster-psudo-random-generator-xorshift/ @@ -44,4 +44,4 @@ struct perfect_forwarding_test { {} }; -#endif // COLONY_LIST_TEST_HELPERS_H +#endif // CATA_TESTS_COLONY_LIST_TEST_HELPERS_H diff --git a/tests/map_helpers.h b/tests/map_helpers.h index e0b37ac3a016d..44309b8f6a38f 100644 --- a/tests/map_helpers.h +++ b/tests/map_helpers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef MAP_HELPERS_H -#define MAP_HELPERS_H +#ifndef CATA_TESTS_MAP_HELPERS_H +#define CATA_TESTS_MAP_HELPERS_H #include @@ -19,4 +19,4 @@ monster &spawn_test_monster( const std::string &monster_type, const tripoint &st void clear_vehicles(); void build_test_map( const ter_id &terrain ); -#endif +#endif // CATA_TESTS_MAP_HELPERS_H diff --git a/tests/options_helpers.h b/tests/options_helpers.h index d5a345d4a48e8..1d947974b0a54 100644 --- a/tests/options_helpers.h +++ b/tests/options_helpers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef CATA_TEST_OPTIONS_HELPERS_H -#define CATA_TEST_OPTIONS_HELPERS_H +#ifndef CATA_TESTS_OPTIONS_HELPERS_H +#define CATA_TESTS_OPTIONS_HELPERS_H #include @@ -18,4 +18,4 @@ class override_option std::string old_value_; }; -#endif +#endif // CATA_TESTS_OPTIONS_HELPERS_H diff --git a/tests/player_helpers.h b/tests/player_helpers.h index 0d734802ac4f3..2abc8a1917f5e 100644 --- a/tests/player_helpers.h +++ b/tests/player_helpers.h @@ -1,6 +1,6 @@ #pragma once -#ifndef PLAYER_HELPERS_H -#define PLAYER_HELPERS_H +#ifndef CATA_TESTS_PLAYER_HELPERS_H +#define CATA_TESTS_PLAYER_HELPERS_H #include @@ -19,4 +19,4 @@ void process_activity( player &dummy ); npc &spawn_npc( const point &, const std::string &npc_class ); void give_and_activate_bionic( player &, bionic_id const & ); -#endif +#endif // CATA_TESTS_PLAYER_HELPERS_H diff --git a/tests/test_statistics.h b/tests/test_statistics.h index 65772e5ab5b77..93d1763c6f1df 100644 --- a/tests/test_statistics.h +++ b/tests/test_statistics.h @@ -1,6 +1,6 @@ #pragma once -#ifndef TEST_STATISTICS_H -#define TEST_STATISTICS_H +#ifndef CATA_TESTS_TEST_STATISTICS_H +#define CATA_TESTS_TEST_STATISTICS_H #include #include @@ -227,4 +227,4 @@ inline BinomialMatcher IsBinomialObservation( return BinomialMatcher( num_samples, p, max_deviation ); } -#endif +#endif // CATA_TESTS_TEST_STATISTICS_H From dad99aaeca0e0b9c3916079b1e9b3e94cae5a5bf Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Fri, 10 Apr 2020 16:07:13 -0400 Subject: [PATCH 3/6] Suppress guard change for catch.hpp We don't want to change the header guard for catch.hpp. --- tests/catch/catch.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/catch/catch.hpp b/tests/catch/catch.hpp index 3836b220c2544..94b5497e0c03c 100644 --- a/tests/catch/catch.hpp +++ b/tests/catch/catch.hpp @@ -8,6 +8,7 @@ * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ +// NOLINTNEXTLINE(cata-header-guard) #ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED #define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED // start catch.hpp From 8fcfd30fc7917d5640c3df93629d1a88d42dfb3d Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Fri, 10 Apr 2020 17:27:55 -0400 Subject: [PATCH 4/6] Suppress header guard in version.h --- CMakeLists.txt | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0f5e0cc7f3c1..a56cfa0af9c53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,8 @@ ADD_DEFINITIONS(-DCMAKE) if (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND) string(REPLACE "-NOTFOUND" "" GIT_VERSION ${GIT_VERSION}) - FILE(WRITE ${CMAKE_SOURCE_DIR}/src/version.h "\#define VERSION \"${GIT_VERSION}\"\n") + FILE(WRITE ${CMAKE_SOURCE_DIR}/src/version.h + "// NOLINT(cata-header-guard)\n\#define VERSION \"${GIT_VERSION}\"\n") MESSAGE(STATUS "${PROJECT_NAME} build version is : ${GIT_VERSION}\n") ADD_DEFINITIONS(-DGIT_VERSION) ELSE (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND) diff --git a/Makefile b/Makefile index 2a5fa2f84cd94..63b08fa89fa27 100644 --- a/Makefile +++ b/Makefile @@ -847,7 +847,7 @@ version: @( VERSION_STRING=$(VERSION) ; \ [ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty --match "[0-9A-Z]*.[0-9A-Z]*" ) && VERSION_STRING=$$GITVERSION ; \ [ -e "$(SRC_DIR)/version.h" ] && OLDVERSION=$$(grep VERSION $(SRC_DIR)/version.h|cut -d '"' -f2) ; \ - if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then echo "#define VERSION \"$$VERSION_STRING\"" | tee $(SRC_DIR)/version.h ; fi \ + if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then printf '// NOLINT(cata-header-guard)\n#define VERSION "%s"\n' "$$VERSION_STRING" | tee $(SRC_DIR)/version.h ; fi \ ) # Unconditionally create the object dir on every invocation. From 5dac865965d34726830c338d35cddbfcf783d747 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Fri, 10 Apr 2020 21:54:38 -0400 Subject: [PATCH 5/6] Fix header guards in tools dir --- tools/clang-tidy-plugin/HeaderGuardCheck.h | 6 +++--- tools/clang-tidy-plugin/JsonTranslationInputCheck.h | 6 +++--- tools/clang-tidy-plugin/NoLongCheck.h | 6 +++--- tools/clang-tidy-plugin/NoStaticGettextCheck.h | 6 +++--- tools/clang-tidy-plugin/PointInitializationCheck.h | 6 +++--- tools/clang-tidy-plugin/SimplifyPointConstructorsCheck.h | 6 +++--- tools/clang-tidy-plugin/StringLiteralIterator.h | 6 +++--- tools/clang-tidy-plugin/TestFilenameCheck.h | 6 +++--- tools/clang-tidy-plugin/TextStyleCheck.h | 6 +++--- tools/clang-tidy-plugin/TranslatorCommentsCheck.h | 6 +++--- tools/clang-tidy-plugin/UseNamedPointConstantsCheck.h | 6 +++--- tools/clang-tidy-plugin/UsePointApisCheck.h | 6 +++--- tools/clang-tidy-plugin/UsePointArithmeticCheck.h | 6 +++--- tools/clang-tidy-plugin/Utils.h | 6 +++--- tools/clang-tidy-plugin/XYCheck.h | 6 +++--- 15 files changed, 45 insertions(+), 45 deletions(-) diff --git a/tools/clang-tidy-plugin/HeaderGuardCheck.h b/tools/clang-tidy-plugin/HeaderGuardCheck.h index e8ee6204fd992..d131504f578cd 100644 --- a/tools/clang-tidy-plugin/HeaderGuardCheck.h +++ b/tools/clang-tidy-plugin/HeaderGuardCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_CLANG_TIDY_PLUGIN_HEADER_GUEAD_CHECK_H -#define CATA_CLANG_TIDY_PLUGIN_HEADER_GUEAD_CHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_HEADERGUARDCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_HEADERGUARDCHECK_H #include @@ -23,4 +23,4 @@ class CataHeaderGuardCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADER_GUARD_CHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_HEADERGUARDCHECK_H diff --git a/tools/clang-tidy-plugin/JsonTranslationInputCheck.h b/tools/clang-tidy-plugin/JsonTranslationInputCheck.h index c8247b6f353b8..5a8147556444d 100644 --- a/tools/clang-tidy-plugin/JsonTranslationInputCheck.h +++ b/tools/clang-tidy-plugin/JsonTranslationInputCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_JSONTRANSLATIONINPUTCHECK_H -#define CATA_TOOLS_CLANG_TIDY_JSONTRANSLATIONINPUTCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_JSONTRANSLATIONINPUTCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_JSONTRANSLATIONINPUTCHECK_H #include #include @@ -29,4 +29,4 @@ class JsonTranslationInputCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_JSONTRANSLATIONINPUTCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_JSONTRANSLATIONINPUTCHECK_H diff --git a/tools/clang-tidy-plugin/NoLongCheck.h b/tools/clang-tidy-plugin/NoLongCheck.h index 3b75a2dd205da..58b259abec9ab 100644 --- a/tools/clang-tidy-plugin/NoLongCheck.h +++ b/tools/clang-tidy-plugin/NoLongCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_NOLONGCHECK_H -#define CATA_TOOLS_CLANG_TIDY_NOLONGCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_NOLONGCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_NOLONGCHECK_H #include #include @@ -31,4 +31,4 @@ class NoLongCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_NOLONGCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_NOLONGCHECK_H diff --git a/tools/clang-tidy-plugin/NoStaticGettextCheck.h b/tools/clang-tidy-plugin/NoStaticGettextCheck.h index fbb48dcc7707f..5f4242a2fea44 100644 --- a/tools/clang-tidy-plugin/NoStaticGettextCheck.h +++ b/tools/clang-tidy-plugin/NoStaticGettextCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_NOSTATICGETTEXTCHECK_H -#define CATA_TOOLS_CLANG_TIDY_NOSTATICGETTEXTCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_NOSTATICGETTEXTCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_NOSTATICGETTEXTCHECK_H #include #include @@ -29,4 +29,4 @@ class NoStaticGettextCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_NOSTATICGETTEXTCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_NOSTATICGETTEXTCHECK_H diff --git a/tools/clang-tidy-plugin/PointInitializationCheck.h b/tools/clang-tidy-plugin/PointInitializationCheck.h index 7925bf5949a6b..a5b899c7c846a 100644 --- a/tools/clang-tidy-plugin/PointInitializationCheck.h +++ b/tools/clang-tidy-plugin/PointInitializationCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_POINTINITIALIZATIONCHECK_H -#define CATA_TOOLS_CLANG_TIDY_POINTINITIALIZATIONCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_POINTINITIALIZATIONCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_POINTINITIALIZATIONCHECK_H #include #include @@ -29,4 +29,4 @@ class PointInitializationCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_POINTINITIALIZATIONCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_POINTINITIALIZATIONCHECK_H diff --git a/tools/clang-tidy-plugin/SimplifyPointConstructorsCheck.h b/tools/clang-tidy-plugin/SimplifyPointConstructorsCheck.h index 81b289a64afb6..7e16c3ae133f5 100644 --- a/tools/clang-tidy-plugin/SimplifyPointConstructorsCheck.h +++ b/tools/clang-tidy-plugin/SimplifyPointConstructorsCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_SIMPLIFYPOINTCONSTRUCTORSCHECK_H -#define CATA_TOOLS_CLANG_TIDY_SIMPLIFYPOINTCONSTRUCTORSCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_SIMPLIFYPOINTCONSTRUCTORSCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_SIMPLIFYPOINTCONSTRUCTORSCHECK_H #include #include @@ -30,4 +30,4 @@ class SimplifyPointConstructorsCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_SIMPLIFYPOINTCONSTRUCTORSCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_SIMPLIFYPOINTCONSTRUCTORSCHECK_H diff --git a/tools/clang-tidy-plugin/StringLiteralIterator.h b/tools/clang-tidy-plugin/StringLiteralIterator.h index f5ccef962cc85..3aad838b9718a 100644 --- a/tools/clang-tidy-plugin/StringLiteralIterator.h +++ b/tools/clang-tidy-plugin/StringLiteralIterator.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_STRINGLITERALITERATOR_H -#define CATA_TOOLS_CLANG_TIDY_STRINGLITERALITERATOR_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_STRINGLITERALITERATOR_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_STRINGLITERALITERATOR_H #include #include @@ -85,4 +85,4 @@ struct iterator_traits { }; } // namespace std -#endif // CATA_TOOLS_CLANG_TIDY_STRINGLITERALITERATOR_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_STRINGLITERALITERATOR_H diff --git a/tools/clang-tidy-plugin/TestFilenameCheck.h b/tools/clang-tidy-plugin/TestFilenameCheck.h index 2f09012c3a29d..74ebb865e5f5d 100644 --- a/tools/clang-tidy-plugin/TestFilenameCheck.h +++ b/tools/clang-tidy-plugin/TestFilenameCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_TESTFILENAMECHECK_H -#define CATA_TOOLS_CLANG_TIDY_TESTFILENAMECHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_TESTFILENAMECHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_TESTFILENAMECHECK_H #include @@ -29,4 +29,4 @@ class TestFilenameCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_TESTFILENAMECHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_TESTFILENAMECHECK_H diff --git a/tools/clang-tidy-plugin/TextStyleCheck.h b/tools/clang-tidy-plugin/TextStyleCheck.h index 4fcf1cd6a5f7f..5d4101e006cec 100644 --- a/tools/clang-tidy-plugin/TextStyleCheck.h +++ b/tools/clang-tidy-plugin/TextStyleCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_TEXTSTYLECHECK_H -#define CATA_TOOLS_CLANG_TIDY_TEXTSTYLECHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_TEXTSTYLECHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_TEXTSTYLECHECK_H #include #include @@ -33,4 +33,4 @@ class TextStyleCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_TEXTSTYLECHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_TEXTSTYLECHECK_H diff --git a/tools/clang-tidy-plugin/TranslatorCommentsCheck.h b/tools/clang-tidy-plugin/TranslatorCommentsCheck.h index 29d8d0e556b5c..c0da879456af9 100644 --- a/tools/clang-tidy-plugin/TranslatorCommentsCheck.h +++ b/tools/clang-tidy-plugin/TranslatorCommentsCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_TRANSLATORCOMMENTSCHECK_H -#define CATA_TOOLS_CLANG_TIDY_TRANSLATORCOMMENTSCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_TRANSLATORCOMMENTSCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_TRANSLATORCOMMENTSCHECK_H #include #include @@ -42,4 +42,4 @@ class TranslatorCommentsCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_TRANSLATORCOMMENTSCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_TRANSLATORCOMMENTSCHECK_H diff --git a/tools/clang-tidy-plugin/UseNamedPointConstantsCheck.h b/tools/clang-tidy-plugin/UseNamedPointConstantsCheck.h index e01965ef8faa0..2e8bcf9861dd6 100644 --- a/tools/clang-tidy-plugin/UseNamedPointConstantsCheck.h +++ b/tools/clang-tidy-plugin/UseNamedPointConstantsCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_USENAMESPOINTCONSTANTSCHECK_H -#define CATA_TOOLS_CLANG_TIDY_USENAMESPOINTCONSTANTSCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_USENAMEDPOINTCONSTANTSCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_USENAMEDPOINTCONSTANTSCHECK_H #include #include @@ -30,4 +30,4 @@ class UseNamedPointConstantsCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_USENAMESPOINTCONSTANTSCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_USENAMEDPOINTCONSTANTSCHECK_H diff --git a/tools/clang-tidy-plugin/UsePointApisCheck.h b/tools/clang-tidy-plugin/UsePointApisCheck.h index 7c6f990f0913e..5d14331872fd7 100644 --- a/tools/clang-tidy-plugin/UsePointApisCheck.h +++ b/tools/clang-tidy-plugin/UsePointApisCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_USEPOINTAPISCHECK_H -#define CATA_TOOLS_CLANG_TIDY_USEPOINTAPISCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTAPISCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTAPISCHECK_H #include #include @@ -30,4 +30,4 @@ class UsePointApisCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_USEPOINTAPISCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTAPISCHECK_H diff --git a/tools/clang-tidy-plugin/UsePointArithmeticCheck.h b/tools/clang-tidy-plugin/UsePointArithmeticCheck.h index 8bd630b1bbb35..f6010ea86bbbf 100644 --- a/tools/clang-tidy-plugin/UsePointArithmeticCheck.h +++ b/tools/clang-tidy-plugin/UsePointArithmeticCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_USEPOINTARITHMETICCHECK_H -#define CATA_TOOLS_CLANG_TIDY_USEPOINTARITHMETICCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTARITHMETICCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTARITHMETICCHECK_H #include #include @@ -30,4 +30,4 @@ class UsePointArithmeticCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_USEPOINTARITHMETICCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_USEPOINTARITHMETICCHECK_H diff --git a/tools/clang-tidy-plugin/Utils.h b/tools/clang-tidy-plugin/Utils.h index 38b1fc2e1bfac..3d3ff3052bf9e 100644 --- a/tools/clang-tidy-plugin/Utils.h +++ b/tools/clang-tidy-plugin/Utils.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_UTILS_H -#define CATA_TOOLS_CLANG_TIDY_UTILS_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_UTILS_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_UTILS_H #include #include @@ -143,4 +143,4 @@ class NameConvention } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_UTILS_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_UTILS_H diff --git a/tools/clang-tidy-plugin/XYCheck.h b/tools/clang-tidy-plugin/XYCheck.h index 8c65d261da63c..4493cc25b2e94 100644 --- a/tools/clang-tidy-plugin/XYCheck.h +++ b/tools/clang-tidy-plugin/XYCheck.h @@ -1,5 +1,5 @@ -#ifndef CATA_TOOLS_CLANG_TIDY_XYCHECK_H -#define CATA_TOOLS_CLANG_TIDY_XYCHECK_H +#ifndef CATA_TOOLS_CLANG_TIDY_PLUGIN_XYCHECK_H +#define CATA_TOOLS_CLANG_TIDY_PLUGIN_XYCHECK_H #include #include @@ -29,4 +29,4 @@ class XYCheck : public ClangTidyCheck } // namespace tidy } // namespace clang -#endif // CATA_TOOLS_CLANG_TIDY_XYCHECK_H +#endif // CATA_TOOLS_CLANG_TIDY_PLUGIN_XYCHECK_H From c034a56288d5bcc7f651870af6afcae9d94f3b88 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Fri, 10 Apr 2020 21:55:02 -0400 Subject: [PATCH 6/6] Report clang-tidy issues on tools headers --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index d7607ac2c776e..d85ba329c3b50 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -55,7 +55,7 @@ readability-*,\ -readability-redundant-declaration,\ " WarningsAsErrors: '*' -HeaderFilterRegex: '(src|test).*' +HeaderFilterRegex: '(src|test|tools).*' FormatStyle: none CheckOptions: - key: readability-uppercase-literal-suffix.NewSuffixes