diff --git a/.clang-format b/.clang-format index f65d6a0..94ddad8 100644 --- a/.clang-format +++ b/.clang-format @@ -151,4 +151,13 @@ IncludeCategories: Priority: 13 - Regex: '^<[a-zA-Z0-9_/]+>' Priority: 14 -MainIncludeChar: AngleBracket \ No newline at end of file +MainIncludeChar: AngleBracket +Macros: + - 'BIGFOOT_OPTIMIZED_ONLY(x)=x' + - 'BIGFOOT_OPTIMIZED_ONLY(x,y)=x,y' + - 'BIGFOOT_NOT_OPTIMIZED_ONLY(x)=x' + - 'BIGFOOT_NOT_OPTIMIZED_ONLY(x,y)=x,y' + - 'BIGFOOT_TOOLMODE_ONLY(x)=x' + - 'BIGFOOT_TOOLMODE_ONLY(x,y)=x,y' + - 'BIGFOOT_GAME_ONLY(x)=x' + - 'BIGFOOT_GAME_ONLY(x,y)=x,y' diff --git a/Bigfoot/Benchmarks/Tools/SasquatchBaker/SasquatchBaker.cpp b/Bigfoot/Benchmarks/Tools/SasquatchBaker/SasquatchBaker.cpp index ec57a6f..811faf4 100644 --- a/Bigfoot/Benchmarks/Tools/SasquatchBaker/SasquatchBaker.cpp +++ b/Bigfoot/Benchmarks/Tools/SasquatchBaker/SasquatchBaker.cpp @@ -11,7 +11,10 @@ #include +#define BIGFOOT_GAME #include +#include +#undef BIGFOOT_GAME #include @@ -21,13 +24,6 @@ #include #include -// SasquatchInfo_generated.hpp only exposes SASQUATCH_..._LOCATION in BIGFOOT_GAME builds, but this -// benchmark needs it to bake into a Sasquatch file from toolmode. Fake the macro locally rather than -// widening the shared template. -#define BIGFOOT_GAME -#include -#undef BIGFOOT_GAME - namespace Bigfoot { class SasquatchBakerFixture: public benchmark::Fixture diff --git a/Bigfoot/Sources/Engine/Sasquatch/Sasquatch.cpp b/Bigfoot/Sources/Engine/Sasquatch/Sasquatch.cpp index ff241f2..48b9e64 100644 --- a/Bigfoot/Sources/Engine/Sasquatch/Sasquatch.cpp +++ b/Bigfoot/Sources/Engine/Sasquatch/Sasquatch.cpp @@ -17,7 +17,7 @@ namespace Bigfoot SasquatchWriter::SasquatchWriter(const File& p_file, const std::uint64_t p_assetCount, const std::size_t p_totalFlatbufferBytes): - BIGFOOT_NOT_OPTIMIZED_ONLY(m_assetCount(p_assetCount),) + BIGFOOT_NOT_OPTIMIZED_ONLY(m_assetCount(p_assetCount), ) m_nextOffset(sizeof(SasquatchHeader) + p_assetCount * sizeof(SasquatchEntry)), m_prefetchedUpTo(0), m_file(p_file, m_nextOffset + p_totalFlatbufferBytes)