diff --git a/Code/Editor/Platform/Windows/Editor/Core/QtEditorApplication_windows.cpp b/Code/Editor/Platform/Windows/Editor/Core/QtEditorApplication_windows.cpp index f8065af931..1fd7f29ca3 100644 --- a/Code/Editor/Platform/Windows/Editor/Core/QtEditorApplication_windows.cpp +++ b/Code/Editor/Platform/Windows/Editor/Core/QtEditorApplication_windows.cpp @@ -135,7 +135,7 @@ namespace Editor } widget = widget->parentWidget(); } - return false; + return nullptr; }; if (object == toolBarAt(QCursor::pos())) { diff --git a/Code/Editor/Util/3DConnexionDriver.cpp b/Code/Editor/Util/3DConnexionDriver.cpp index 9dc1600185..c0d4393b49 100644 --- a/Code/Editor/Util/3DConnexionDriver.cpp +++ b/Code/Editor/Util/3DConnexionDriver.cpp @@ -116,9 +116,6 @@ bool C3DConnexionDriver::GetInputMessageData(LPARAM lParam, S3DConnexionMessage& { if (event->header.dwType == RIM_TYPEHID) { - static bool bGotTranslation = false, - bGotRotation = false; - static int all6DOFs[6] = {0}; LPRAWHID pRawHid = &event->data.hid; // Translation or Rotation packet? They come in two different packets. diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index 90362a3ce8..0d3cc7e032 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -140,7 +140,7 @@ namespace AZ { SymRegisterCallback64_t g_SymRegisterCallback64; HMODULE g_dbgHelpDll; -#define LOAD_FUNCTION(A) { g_##A = (A##_t)GetProcAddress(g_dbgHelpDll, #A); AZ_Assert(g_##A != 0, ("Can not load %s function!",#A)); } +#define LOAD_FUNCTION(A) { g_##A = (A##_t)GetProcAddress(g_dbgHelpDll, #A); AZ_Assert(g_##A != 0, "Can not load %s function!",#A); } using namespace AZ::Debug; @@ -596,7 +596,7 @@ namespace AZ { result = GetLastError(); } ULONGLONG fileVersion = 0; - if (szImg != NULL) + if (szImg[0]) // !szImg.empty() { // try to retrieve the file-version: VS_FIXEDFILEINFO* fInfo = NULL; @@ -624,43 +624,6 @@ namespace AZ { } } - // Retrive some additional-infos about the module - IMAGEHLP_MODULE64 Module; - const char* szSymType = "-unknown-"; - if (GetModuleInfo(hProcess, baseAddr, &Module) != FALSE) - { - switch (Module.SymType) - { - case SymNone: - szSymType = "-nosymbols-"; - break; - case SymCoff: - szSymType = "COFF"; - break; - case SymCv: - szSymType = "CV"; - break; - case SymPdb: - szSymType = "PDB"; - break; - case SymExport: - szSymType = "-exported-"; - break; - case SymDeferred: - szSymType = "-deferred-"; - break; - case SymSym: - szSymType = "SYM"; - break; - case 8: //SymVirtual: - szSymType = "Virtual"; - break; - case 9: // SymDia: - szSymType = "DIA"; - break; - } - } - // find insert position if (g_moduleInfo.size() < g_moduleInfo.capacity()) { @@ -1073,7 +1036,7 @@ cleanup: } HANDLE hThread = nativeThread; - CONTEXT alignas(8) context; // Without this alignment the function randomly crashes in release. + alignas(alignof(CONTEXT)) CONTEXT context; // Without this alignment the function randomly crashes in release. context.ContextFlags = CONTEXT_ALL; GetThreadContext(hThread, &context); diff --git a/Code/Framework/AzCore/Tests/AZStd/Examples.cpp b/Code/Framework/AzCore/Tests/AZStd/Examples.cpp index 518eb5eed6..89441b711e 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Examples.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Examples.cpp @@ -443,7 +443,7 @@ namespace UnitTest : m_data(data) { /* expensive operations */ } private: - int m_data; + [[maybe_unused]] int m_data; }; ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzCore/Tests/AZStd/String.cpp b/Code/Framework/AzCore/Tests/AZStd/String.cpp index 50450a898c..f53a90047f 100644 --- a/Code/Framework/AzCore/Tests/AZStd/String.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/String.cpp @@ -2537,7 +2537,7 @@ namespace Benchmark { AZStd::string test1{ "foo bar"}; AZStd::string test2{ "bar foo" }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { SwapStringViaPointerSizedSwaps(test1, test2); } @@ -2547,7 +2547,7 @@ namespace Benchmark { AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" }; AZStd::string test2{ "The quick brown fox jumped over the lazy dog" }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { SwapStringViaPointerSizedSwaps(test1, test2); } @@ -2557,7 +2557,7 @@ namespace Benchmark { AZStd::string test1{ "foo bar" }; AZStd::string test2{ "bar foo" }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { SwapStringViaMemcpy(test1, test2); } @@ -2567,7 +2567,7 @@ namespace Benchmark { AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" }; AZStd::string test2{ "The quick brown fox jumped over the lazy dog" }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { SwapStringViaMemcpy(test1, test2); } @@ -2584,7 +2584,7 @@ namespace Benchmark AZStd::string sourceString(state.range(0), 'a'); const char* sourceAddress = sourceString.c_str(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(sourceAddress); @@ -2600,7 +2600,7 @@ namespace Benchmark const char* sourceAddress = sourceString.c_str(); const size_t sourceSize = sourceString.size(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(sourceAddress, sourceSize); @@ -2616,7 +2616,7 @@ namespace Benchmark auto sourceBegin = sourceString.begin(); auto sourceEnd = sourceString.end(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(sourceBegin, sourceEnd); @@ -2631,7 +2631,7 @@ namespace Benchmark AZStd::string sourceString(state.range(0), 'a'); AZStd::string_view sourceView(sourceString); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(sourceView); @@ -2645,7 +2645,7 @@ namespace Benchmark { AZStd::string sourceString(state.range(0), 'a'); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(sourceString); @@ -2659,7 +2659,7 @@ namespace Benchmark { AZStd::string sourceString(state.range(0), 'a'); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(AZStd::move(sourceString)); @@ -2671,7 +2671,7 @@ namespace Benchmark BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromSingleCharacter, AZStd::string)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::string assignString; assignString.assign(state.range(0), 'a'); @@ -2689,7 +2689,7 @@ namespace Benchmark AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); const char* sourceAddress = sourceString.c_str(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(sourceAddress); @@ -2705,7 +2705,7 @@ namespace Benchmark const char* sourceAddress = sourceString.c_str(); const size_t sourceSize = sourceString.size(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(sourceAddress, sourceSize); @@ -2721,7 +2721,7 @@ namespace Benchmark auto sourceBegin = sourceString.begin(); auto sourceEnd = sourceString.end(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(sourceBegin, sourceEnd); @@ -2736,7 +2736,7 @@ namespace Benchmark AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); AZStd::string_view sourceView(sourceString); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(sourceView); @@ -2750,7 +2750,7 @@ namespace Benchmark { AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(sourceString); @@ -2764,7 +2764,7 @@ namespace Benchmark { AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(AZStd::move(sourceString)); @@ -2776,7 +2776,7 @@ namespace Benchmark BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromSingleCharacter, AZStd::fixed_string<1024>)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::fixed_string<1024> assignString; assignString.assign(state.range(0), 'a'); diff --git a/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp index f84b60af07..65bd609e37 100644 --- a/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp @@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark AZ::Dom::JsonBackend backend; AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); AZStd::string payloadCopy = serializedPayload; @@ -53,7 +53,7 @@ namespace AZ::Dom::Benchmark AZ::Dom::JsonBackend backend; AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); AZStd::string payloadCopy = serializedPayload; @@ -77,7 +77,7 @@ namespace AZ::Dom::Benchmark AZ::Dom::JsonBackend backend; AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { auto result = AZ::Dom::Json::WriteToRapidJsonDocument( [&](AZ::Dom::Visitor& visitor) @@ -97,7 +97,7 @@ namespace AZ::Dom::Benchmark AZ::Dom::JsonBackend backend; AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { auto result = AZ::Dom::Utils::WriteToValue( [&](AZ::Dom::Visitor& visitor) @@ -117,7 +117,7 @@ namespace AZ::Dom::Benchmark AZ::Dom::JsonBackend backend; AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { auto result = AZ::JsonSerializationUtils::ReadJsonString(serializedPayload); @@ -130,7 +130,7 @@ namespace AZ::Dom::Benchmark BENCHMARK_DEFINE_F(DomJsonBenchmark, RapidjsonMakeComplexObject)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { TakeAndDiscardWithoutTimingDtor(GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)), state); } @@ -152,7 +152,7 @@ namespace AZ::Dom::Benchmark document.GetAllocator()); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const AZStd::string& key : keys) { @@ -168,7 +168,7 @@ namespace AZ::Dom::Benchmark { rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { rapidjson::Document copy; copy.CopyFrom(original, copy.GetAllocator(), true); @@ -184,7 +184,7 @@ namespace AZ::Dom::Benchmark { rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { rapidjson::Document copy; copy.CopyFrom(original, copy.GetAllocator(), true); diff --git a/Code/Framework/AzCore/Tests/DOM/DomPathBenchmarks.cpp b/Code/Framework/AzCore/Tests/DOM/DomPathBenchmarks.cpp index 4741900aa1..10c5fa1394 100644 --- a/Code/Framework/AzCore/Tests/DOM/DomPathBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/DOM/DomPathBenchmarks.cpp @@ -20,7 +20,7 @@ namespace AZ::Dom::Benchmark PathEntry end; end.SetEndOfArray(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Path p; p /= entry1; @@ -40,7 +40,7 @@ namespace AZ::Dom::Benchmark PathEntry end; end.SetEndOfArray(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Path p = Path() / entry1 / entry2 / 0 / end; } @@ -55,7 +55,7 @@ namespace AZ::Dom::Benchmark AZStd::string s; s.resize_no_construct(p.GetStringLength()); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { p.GetStringLength(); p.FormatString(s.data(), s.size()); @@ -69,7 +69,7 @@ namespace AZ::Dom::Benchmark { AZStd::string pathString = "/path/with/multiple/0/different/components/including-long-strings-like-this/65536/999/-"; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Path p(pathString); benchmark::DoNotOptimize(p); @@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark PathEntry endOfArray; endOfArray.SetEndOfArray(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { name.IsEndOfArray(); index.IsEndOfArray(); diff --git a/Code/Framework/AzCore/Tests/DOM/DomValueBenchmarks.cpp b/Code/Framework/AzCore/Tests/DOM/DomValueBenchmarks.cpp index 69d99eb12b..b73306f516 100644 --- a/Code/Framework/AzCore/Tests/DOM/DomValueBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/DOM/DomValueBenchmarks.cpp @@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark Value doubleValue(4.0); Value stringValue("foo", true); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { (intValue.GetType()); (boolValue.GetType()); @@ -118,7 +118,7 @@ namespace AZ::Dom::Benchmark value.GetInternalValue()); }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { (getTypeViaVisit(intValue)); (getTypeViaVisit(boolValue)); @@ -136,7 +136,7 @@ namespace AZ::Dom::Benchmark BENCHMARK_DEFINE_F(DomValueBenchmark, AzDomValueMakeComplexObject)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { TakeAndDiscardWithoutTimingDtor(GenerateDomBenchmarkPayload(state.range(0), state.range(1)), state); } @@ -149,7 +149,7 @@ namespace AZ::Dom::Benchmark { Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Value copy = original; benchmark::DoNotOptimize(copy); @@ -163,7 +163,7 @@ namespace AZ::Dom::Benchmark { Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Value copy = original; copy["entries"]["Key0"].ArrayPushBack(Value(42)); @@ -178,7 +178,7 @@ namespace AZ::Dom::Benchmark { Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { Value copy = Utils::DeepCopy(original); TakeAndDiscardWithoutTimingDtor(AZStd::move(copy), state); @@ -199,7 +199,7 @@ namespace AZ::Dom::Benchmark value[key] = i; } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const AZ::Name& key : keys) { @@ -222,7 +222,7 @@ namespace AZ::Dom::Benchmark value[key] = i; } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const AZStd::string& key : keys) { @@ -245,7 +245,7 @@ namespace AZ::Dom::Benchmark value[key] = i; } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const AZStd::string& key : keys) { diff --git a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp index cf239a0821..91620ae918 100644 --- a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp +++ b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp @@ -966,7 +966,7 @@ namespace Benchmark BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendFixedPath)(benchmark::State& state) { AZ::IO::FixedMaxPath m_testPath{ "." }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const auto& appendPath : m_appendPaths) { @@ -977,7 +977,7 @@ namespace Benchmark BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendAllocatingPath)(benchmark::State& state) { AZ::IO::Path m_testPath{ "." }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const auto& appendPath : m_appendPaths) { @@ -989,7 +989,7 @@ namespace Benchmark BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinFixedString)(benchmark::State& state) { AZStd::string m_testPath{ "." }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const auto& appendPath : m_appendPaths) { @@ -1000,7 +1000,7 @@ namespace Benchmark BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinAZStdString)(benchmark::State& state) { AZStd::string m_testPath{ "." }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (const auto& appendPath : m_appendPaths) { diff --git a/Code/Framework/AzCore/Tests/Jobs.cpp b/Code/Framework/AzCore/Tests/Jobs.cpp index 20c960535d..afe2d72acf 100644 --- a/Code/Framework/AzCore/Tests/Jobs.cpp +++ b/Code/Framework/AzCore/Tests/Jobs.cpp @@ -1741,7 +1741,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1749,7 +1749,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1757,7 +1757,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1765,7 +1765,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1773,7 +1773,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1781,7 +1781,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1789,7 +1789,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1797,7 +1797,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1805,7 +1805,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1813,7 +1813,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(SMALL_NUMBER_OF_JOBS); } @@ -1821,7 +1821,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(MEDIUM_NUMBER_OF_JOBS); } @@ -1829,7 +1829,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(LARGE_NUMBER_OF_JOBS); } @@ -1837,7 +1837,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1845,7 +1845,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1853,7 +1853,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1861,7 +1861,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1869,7 +1869,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1877,7 +1877,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1885,7 +1885,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1893,7 +1893,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1901,7 +1901,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH); } @@ -1909,7 +1909,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(SMALL_NUMBER_OF_JOBS); } @@ -1917,7 +1917,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(MEDIUM_NUMBER_OF_JOBS); } @@ -1925,7 +1925,7 @@ namespace Benchmark BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(LARGE_NUMBER_OF_JOBS); } diff --git a/Code/Framework/AzCore/Tests/Math/CrcTests.cpp b/Code/Framework/AzCore/Tests/Math/CrcTests.cpp index 0255c1ad6d..f152744486 100644 --- a/Code/Framework/AzCore/Tests/Math/CrcTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/CrcTests.cpp @@ -54,7 +54,7 @@ namespace Benchmark { // Runtime performance is not actually being measured by this test. // This function only exist to calculate AZ::Crc32 values at compile time - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { [[maybe_unused]] constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values(); } diff --git a/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp index e26d896e5a..7e753fffb9 100644 --- a/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp @@ -63,7 +63,7 @@ namespace Benchmark BENCHMARK_F(BM_MathFrustum, SphereIntersect)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& data : m_dataArray) { @@ -75,7 +75,7 @@ namespace Benchmark BENCHMARK_F(BM_MathFrustum, AabbIntersect)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& data : m_dataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp index 918673d475..c6fe9c8178 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp @@ -68,7 +68,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -80,7 +80,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateZero)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -92,7 +92,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetRowX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -108,7 +108,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetColumnX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -124,7 +124,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromValue)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -136,7 +136,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromRowMajorFloat9)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -148,7 +148,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromColumnMajorFloat9)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -162,7 +162,7 @@ namespace Benchmark { float storeValues[9]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -176,7 +176,7 @@ namespace Benchmark { float storeValues[9]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -188,7 +188,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateRotationX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -200,7 +200,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateRotationY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -212,7 +212,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateRotationZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -224,7 +224,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromTransform)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -236,7 +236,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromMatrix4x4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -248,7 +248,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -260,7 +260,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -272,7 +272,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateDiagonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -284,7 +284,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, CreateCrossProduct)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -296,7 +296,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -308,7 +308,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, SetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -321,7 +321,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, SetRowX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -336,7 +336,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, SetColumnX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -351,7 +351,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetBasisX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -363,7 +363,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetBasisY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -375,7 +375,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetBasisZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -387,7 +387,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorAssign)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -399,7 +399,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiply)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -411,7 +411,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, TransposedMultiply)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -423,7 +423,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, MultiplyVector)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -435,7 +435,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorSum)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -447,7 +447,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorDifference)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -459,7 +459,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiplyScalar)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -471,7 +471,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, OperatorDivideScalar)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -483,7 +483,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, Transpose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -494,7 +494,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetTranspose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -506,7 +506,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, RetrieveScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -518,7 +518,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, ExtractScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -530,7 +530,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, MultiplyByScaleX2)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -542,7 +542,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetPolarDecomposition)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -557,7 +557,7 @@ namespace Benchmark AZ::Matrix3x3 orthogonalOut; AZ::Matrix3x3 symmetricOut; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -568,7 +568,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetInverseFast)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -580,7 +580,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetInverseFull)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -592,7 +592,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, Orthogonalize)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -603,7 +603,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetOrthogonalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -615,7 +615,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, IsOrthogonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -627,7 +627,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetDiagonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -639,7 +639,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetDeterminant)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -651,7 +651,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x3, GetAdjugate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp index 63ddefdd2c..fd942056a2 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp @@ -86,7 +86,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -98,7 +98,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateZero)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -110,7 +110,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromValue)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -122,7 +122,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromRowMajorFloat12)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -134,7 +134,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromRows)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -146,7 +146,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat12)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -158,7 +158,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumns)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -170,7 +170,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat16)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -182,7 +182,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateRotationX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -194,7 +194,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateRotationY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -206,7 +206,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateRotationZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -218,7 +218,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -230,7 +230,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternionAndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -242,7 +242,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -254,7 +254,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3AndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -266,7 +266,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromTransform)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -278,7 +278,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -290,7 +290,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateFromTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -302,7 +302,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, CreateLookAt)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -316,7 +316,7 @@ namespace Benchmark { float testFloats[12]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -330,7 +330,7 @@ namespace Benchmark { float testFloats[12]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -344,7 +344,7 @@ namespace Benchmark { float testFloats[16]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -356,7 +356,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -368,7 +368,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -381,7 +381,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetRow)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -393,7 +393,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetRowAsVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -405,7 +405,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetRowWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -418,7 +418,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector3AndFloat)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -431,7 +431,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -444,7 +444,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetRows)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -459,7 +459,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetRows)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -472,7 +472,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetColumn)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -484,7 +484,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -497,7 +497,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -510,7 +510,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetColumns)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -526,7 +526,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetColumns)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -539,7 +539,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetBasisX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -551,7 +551,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -564,7 +564,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -577,7 +577,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetBasisY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -589,7 +589,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -602,7 +602,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -615,7 +615,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetBasisZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -627,7 +627,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -640,7 +640,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -653,7 +653,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -665,7 +665,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -678,7 +678,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -691,7 +691,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetBasisAndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -707,7 +707,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetBasisAndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -720,7 +720,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyMatrix3x4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -732,7 +732,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyEqualsMatrix3x4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -745,7 +745,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, TransformPointVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -757,7 +757,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, TransformVectorVector4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -769,7 +769,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, Multiply3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -781,7 +781,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetTranspose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -793,7 +793,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, Transpose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -806,7 +806,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetTranspose3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -818,7 +818,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, Transpose3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -831,7 +831,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetInverseFull)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -843,7 +843,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, InvertFull)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -856,7 +856,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetInverseFast)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -868,7 +868,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, InvertFast)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -881,7 +881,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, RetrieveScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -893,7 +893,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, ExtractScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -906,7 +906,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, MultiplyByScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -919,7 +919,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, IsOrthogonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -931,7 +931,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetOrthogonalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -943,7 +943,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, Orthogonalize)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -956,7 +956,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, IsCloseExactAndDifferent)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -971,7 +971,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, OperatorEqualEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -983,7 +983,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, OperatorNotEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -995,7 +995,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1007,7 +1007,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1019,7 +1019,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1032,7 +1032,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1045,7 +1045,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, SetRotationPartFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1058,7 +1058,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, GetDeterminant3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -1070,7 +1070,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix3x4, IsFinite)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp index 21f440c3a1..49a433a7fc 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp @@ -64,7 +64,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -76,7 +76,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateZero)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -88,7 +88,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetRowX4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -106,7 +106,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetColumnX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -124,7 +124,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateFromValue)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -136,7 +136,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateFromRowMajorFloat16)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -148,7 +148,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateFromColumnMajorFloat9)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -160,7 +160,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateProjection)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -172,7 +172,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateProjectionFov)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -184,7 +184,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateInterpolated)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -198,7 +198,7 @@ namespace Benchmark { float storeValues[16]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -212,7 +212,7 @@ namespace Benchmark { float storeValues[16]; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -224,7 +224,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateRotationX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -236,7 +236,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateRotationY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -248,7 +248,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateRotationZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -260,7 +260,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -272,7 +272,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -284,7 +284,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateDiagonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -296,7 +296,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -308,7 +308,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, SetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -321,7 +321,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, SetRowX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -337,7 +337,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, SetColumnX3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -353,7 +353,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetBasisX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -365,7 +365,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetBasisY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -377,7 +377,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetBasisZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -389,7 +389,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, CreateTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -401,7 +401,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, SetTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -414,7 +414,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -426,7 +426,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, OperatorAssign)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -438,7 +438,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiply)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -450,7 +450,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyAssign)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -463,7 +463,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -475,7 +475,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -487,7 +487,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, TransposedMultiply3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -499,7 +499,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, Multiply3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -511,7 +511,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, Transpose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -524,7 +524,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetTranspose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -536,7 +536,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetInverseFast)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -552,7 +552,7 @@ namespace Benchmark AZ::Matrix4x4 mat = AZ::Matrix4x4::CreateRotationX(1.0f); mat.SetElement(0, 1, 23.1234f); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -564,7 +564,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, GetInverseFull)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -576,7 +576,7 @@ namespace Benchmark BENCHMARK_F(BM_MathMatrix4x4, SetRotationPartFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp index d1e8ac2225..ac95912035 100644 --- a/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp @@ -47,7 +47,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, CreateFromPositionRotationAndHalfLengths)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -60,7 +60,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, SetPosition)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -72,7 +72,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetPosition)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -84,7 +84,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetAxisX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -96,7 +96,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetAxisY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -108,7 +108,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetAxisZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -120,7 +120,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetAxisIndex3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -136,7 +136,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, SetHalfLengthX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -148,7 +148,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetHalfLengthX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -160,7 +160,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, SetHalfLengthY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -172,7 +172,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetHalfLengthY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -184,7 +184,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, SetHalfLengthZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -196,7 +196,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetHalfLengthZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -208,7 +208,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, SetHalfLengthIndex3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -222,7 +222,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, GetHalfLengthIndex3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -242,7 +242,7 @@ namespace Benchmark AZ::Vector3 max(120.0f, 300.0f, 50.0f); AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(min, max); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -256,7 +256,7 @@ namespace Benchmark { AZ::Transform transform = AZ::Transform::CreateRotationY(AZ::DegToRad(90.0f)); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -268,7 +268,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, Equal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { @@ -280,7 +280,7 @@ namespace Benchmark BENCHMARK_F(BM_MathObb, IsFinite)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < numIters; ++i) { diff --git a/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp index e066207635..919dc72988 100644 --- a/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp @@ -73,7 +73,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, CreateFromNormalAndDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -85,7 +85,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, GetDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -97,7 +97,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, GetNormal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -109,7 +109,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, CreateFromNormalAndPoint)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -128,7 +128,7 @@ namespace Benchmark coeff.push_back(unif(rng)); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -148,7 +148,7 @@ namespace Benchmark coeff.push_back(unif(rng)); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -160,7 +160,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, SetVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -179,7 +179,7 @@ namespace Benchmark vecs.push_back(AZ::Vector4(unif(rng), unif(rng), unif(rng), unif(rng))); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -192,7 +192,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, SetNormal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -205,7 +205,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, SetDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -218,7 +218,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, GetPlaneEquationCoefficients)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -236,7 +236,7 @@ namespace Benchmark trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng)))); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -254,7 +254,7 @@ namespace Benchmark trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng)))); } - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -265,7 +265,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, GetPointDist)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -277,7 +277,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, GetProjected)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -291,7 +291,7 @@ namespace Benchmark { AZ::Vector3 rayResult; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -305,7 +305,7 @@ namespace Benchmark { float rayResult; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { @@ -319,7 +319,7 @@ namespace Benchmark { AZ::Vector3 rayResult; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters - 1; ++i) { @@ -333,7 +333,7 @@ namespace Benchmark { float rayResult; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters - 1; ++i) { @@ -345,7 +345,7 @@ namespace Benchmark BENCHMARK_F(BM_MathPlane, IsFinite)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (int i = 0; i < m_numIters; ++i) { diff --git a/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp index 486a33ba67..4ef42c3016 100644 --- a/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp @@ -68,7 +68,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SplatFloatConstruction)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -80,7 +80,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, NonNormalized4FloatsConstruction)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -92,7 +92,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, CreateFromIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -104,7 +104,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, CreateZero)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -116,7 +116,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, CreateRotationX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -128,7 +128,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, CreateRotationY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -140,7 +140,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, CreateRotationZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -155,7 +155,7 @@ namespace Benchmark const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized(); const AZ::Vector3 vec2 = AZ::Vector3(-2.0f, 7.0f, -1.0f).GetNormalized(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -170,7 +170,7 @@ namespace Benchmark const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized(); const AZ::Vector3 vec2 = AZ::Vector3(-1.0f, -2.0f, -3.0f).GetNormalized(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -182,7 +182,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -194,7 +194,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -206,7 +206,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -218,7 +218,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetW)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -230,7 +230,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -243,7 +243,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -256,7 +256,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -269,7 +269,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetW)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -282,7 +282,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetSplat)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -295,7 +295,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetAll)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -310,7 +310,7 @@ namespace Benchmark { AZ::Vector3 vec(5.0f, 6.0f, 7.0f); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -324,7 +324,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetArray)(benchmark::State& state) { const float quatArray[4] = { 5.0f, 6.0f, 7.0f, 8.0f }; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& quatData : m_quatDataArray) { @@ -337,7 +337,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetElements)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -353,7 +353,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetElement)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -374,7 +374,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetConjugate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -386,7 +386,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetInverseFast)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -398,7 +398,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetInverseFull)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -410,7 +410,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, Dot)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -422,7 +422,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetLength)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -434,7 +434,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetLengthEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -446,7 +446,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -458,7 +458,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocalEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -470,7 +470,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetNormalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -482,7 +482,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetNormalizedEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -494,7 +494,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, NormalizeWithLength)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -506,7 +506,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, NormalizeWithLengthEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -518,7 +518,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, Lerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -530,7 +530,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, NLerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -542,7 +542,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, Slerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -554,7 +554,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorEquality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -566,7 +566,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorInequality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -578,7 +578,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorNegate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -590,7 +590,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorSum)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -602,7 +602,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorSub)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -614,7 +614,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorMultiply)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -626,7 +626,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, OperatorMultiplyScalar)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -638,7 +638,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, TransformVector)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -653,7 +653,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, IsClose)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -665,7 +665,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, IsIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -677,7 +677,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -689,7 +689,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, GetEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -701,7 +701,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetFromEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -715,7 +715,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, SetFromEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -729,7 +729,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, ConvertToAxisAngle)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& quatData : m_quatDataArray) { @@ -744,7 +744,7 @@ namespace Benchmark BENCHMARK_F(BM_MathQuaternion, AggregateMultiply)(::benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector3 position = AZ::Vector3::CreateZero(); for (auto& quatData : m_quatDataArray) diff --git a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp index ecab1717b2..7526bdb778 100644 --- a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp @@ -80,7 +80,7 @@ namespace Benchmark BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumPoint)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -103,7 +103,7 @@ namespace Benchmark BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumSphere)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -120,7 +120,7 @@ namespace Benchmark BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumSphere)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -137,7 +137,7 @@ namespace Benchmark BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumAabb)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -154,7 +154,7 @@ namespace Benchmark BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumAabb)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp index dde0192ef9..37d9a32820 100644 --- a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp @@ -78,7 +78,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateIdentity)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for ([[maybe_unused]] auto& testData : m_testDataArray) { @@ -90,7 +90,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateRotationX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -102,7 +102,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateRotationY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -114,7 +114,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateRotationZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -126,7 +126,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromQuaternion)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -138,7 +138,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromQuaternionAndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -150,7 +150,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -162,7 +162,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3AndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -174,7 +174,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -186,7 +186,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateUniformScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -198,7 +198,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateFromTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -210,7 +210,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, CreateLookAt)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -223,7 +223,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetBasis)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -235,7 +235,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetBasisX)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -247,7 +247,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetBasisY)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -259,7 +259,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetBasisZ)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -271,7 +271,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetBasisAndTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -287,7 +287,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetTranslation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -299,7 +299,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetTranslationWithFloats)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -312,7 +312,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetTranslationWithVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -325,7 +325,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetRotation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -337,7 +337,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetRotation)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -350,7 +350,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetUniformScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -362,7 +362,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetUniformScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -375,7 +375,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, ExtractUniformScale)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -388,7 +388,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, OperatorMultiplyTransform)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -400,7 +400,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, OperatorMultiplyEqualsTransform)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -413,7 +413,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, TransformPointVector3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -425,7 +425,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, TransformPointVector4)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -437,7 +437,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, TransformVector)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -449,7 +449,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetInverse)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -461,7 +461,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, Invert)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -474,7 +474,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, IsOrthogonal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -486,7 +486,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetOrthogonalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -498,7 +498,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, Orthogonalize)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -511,7 +511,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, IsCloseExactAndDifferent)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -526,7 +526,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, OperatorEqualEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -538,7 +538,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, OperatorNotEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -550,7 +550,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -562,7 +562,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, GetEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -574,7 +574,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetFromEulerDegrees)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -587,7 +587,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, SetFromEulerRadians)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { @@ -600,7 +600,7 @@ namespace Benchmark BENCHMARK_F(BM_MathTransform, IsFinite)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& testData : m_testDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp index 3ab306ff66..6c8e575481 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp @@ -58,7 +58,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetSet)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector2 v1, v2; float x = 0.0f, y = 0.0f; @@ -84,7 +84,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, ElementAccess)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector2 v1, v2; float x = 0.0f, y = 0.0f; @@ -111,7 +111,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, CreateSelectCmpEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -123,7 +123,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreaterEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -135,7 +135,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreater)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -147,7 +147,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetNormalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -159,7 +159,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetNormalizedEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -171,7 +171,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, NormalizeWithLength)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -183,7 +183,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, NormalizeWithLengthEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -195,7 +195,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetNormalizedSafe)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -207,7 +207,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetNormalizedSafeEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -219,7 +219,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -231,7 +231,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetDistanceEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -243,7 +243,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Lerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -267,7 +267,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Slerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -291,7 +291,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Nlerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -315,7 +315,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Dot)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -327,7 +327,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Equality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -339,7 +339,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Inequality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -351,7 +351,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, IsLessThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -363,7 +363,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, IsLessEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -375,7 +375,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, IsGreaterThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -387,7 +387,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, IsGreaterEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -399,7 +399,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetMin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -411,7 +411,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetMax)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -423,7 +423,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetClamp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -435,7 +435,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Sub)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -447,7 +447,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Sum)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -459,7 +459,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Mul)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -471,7 +471,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Div)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -483,7 +483,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetSin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -495,7 +495,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -507,7 +507,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetSinCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -521,7 +521,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetAcos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -533,7 +533,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetAtan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -545,7 +545,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetAtan2)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -557,7 +557,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetAngleMod)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -569,7 +569,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, Angle)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -581,7 +581,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, AngleDeg)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -593,7 +593,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetAbs)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -605,7 +605,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetReciprocal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -617,7 +617,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetReciprocalEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -629,7 +629,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector2, GetProjected)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp index 5f33730bca..3e54e435d8 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp @@ -58,7 +58,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetSet)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector3 v1, v2, v3; float x = 0.0f, y = 0.0f, z = 0.0f; @@ -98,7 +98,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, ElementAccess)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector3 v1, v2, v3; float x = 0.0f, y = 0.0f, z = 0.0f; @@ -138,7 +138,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, CreateSelectCmpEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -150,7 +150,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreaterEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -162,7 +162,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreater)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -174,7 +174,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetNormalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -186,7 +186,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetNormalizedEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -198,7 +198,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, NormalizeWithLength)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -210,7 +210,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, NormalizeWithLengthEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -222,7 +222,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetNormalizedSafe)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -234,7 +234,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetNormalizedSafeEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -246,7 +246,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -258,7 +258,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetDistanceEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -270,7 +270,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Lerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -294,7 +294,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Slerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -318,7 +318,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Nlerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -342,7 +342,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Dot)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -354,7 +354,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Cross)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -366,7 +366,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Equality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -378,7 +378,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Inequality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -390,7 +390,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, IsLessThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -402,7 +402,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, IsLessEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -414,7 +414,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, IsGreaterThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -426,7 +426,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, IsGreaterEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -438,7 +438,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetMin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -450,7 +450,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetMax)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -462,7 +462,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetClamp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -474,7 +474,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Sub)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -486,7 +486,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Sum)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -498,7 +498,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Mul)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -510,7 +510,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Div)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -522,7 +522,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetSin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -534,7 +534,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -546,7 +546,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetSinCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -560,7 +560,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetAcos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -572,7 +572,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetAtan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -584,7 +584,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetAngleMod)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -596,7 +596,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, Angle)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -608,7 +608,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, AngleDeg)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -620,7 +620,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetAbs)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -632,7 +632,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetReciprocal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -644,7 +644,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetReciprocalEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -656,7 +656,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, IsPerpendicular)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -668,7 +668,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetOrthogonalVector)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -680,7 +680,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector3, GetProjected)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { diff --git a/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp index f12851b1ed..d2a5bbd46b 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp @@ -60,7 +60,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetSet)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector4 v1, v2, v3, v4; float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f; @@ -117,7 +117,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, ElementAccess)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZ::Vector4 v1, v2, v3, v4; float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f; @@ -174,7 +174,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, CreateSelectCmpEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -186,7 +186,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreaterEqual)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -198,7 +198,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreater)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -210,7 +210,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetNormalized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -222,7 +222,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetNormalizedEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -234,7 +234,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, NormalizeWithLength)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -246,7 +246,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, NormalizeWithLengthEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -258,7 +258,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetNormalizedSafe)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -270,7 +270,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetNormalizedSafeEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -282,7 +282,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetDistance)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -294,7 +294,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetDistanceEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -306,7 +306,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Lerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -330,7 +330,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Slerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -354,7 +354,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Nlerp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -378,7 +378,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Dot)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -390,7 +390,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Dot3)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -402,7 +402,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetHomogenized)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -414,7 +414,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Equality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -426,7 +426,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Inequality)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -438,7 +438,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, IsLessThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -450,7 +450,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, IsLessEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -462,7 +462,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, IsGreaterThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -474,7 +474,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, IsGreaterEqualThan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -486,7 +486,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetMin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -498,7 +498,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetMax)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -510,7 +510,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetClamp)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -522,7 +522,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Sub)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -534,7 +534,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Sum)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -546,7 +546,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Mul)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -558,7 +558,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Div)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -570,7 +570,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetSin)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -582,7 +582,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -594,7 +594,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetSinCos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -608,7 +608,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetAcos)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -620,7 +620,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetAtan)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -632,7 +632,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetAngleMod)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -644,7 +644,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, Angle)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -656,7 +656,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, AngleDeg)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -668,7 +668,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetAbs)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -680,7 +680,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetReciprocal)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { @@ -692,7 +692,7 @@ namespace Benchmark BENCHMARK_F(BM_MathVector4, GetReciprocalEstimate)(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& vecData : m_vecDataArray) { diff --git a/Code/Framework/AzCore/Tests/Memory.cpp b/Code/Framework/AzCore/Tests/Memory.cpp index 0e0103d162..2be694c384 100644 --- a/Code/Framework/AzCore/Tests/Memory.cpp +++ b/Code/Framework/AzCore/Tests/Memory.cpp @@ -141,7 +141,6 @@ namespace UnitTest //////////////////////////////////////////////////////////////////////// // Create some threads and simulate concurrent allocation and deallocation - AZStd::chrono::system_clock::time_point startTime = AZStd::chrono::system_clock::now(); { AZStd::thread m_threads[m_maxNumThreads]; for (unsigned int i = 0; i < m_maxNumThreads; ++i) @@ -156,8 +155,6 @@ namespace UnitTest m_threads[i].join(); } } - //AZStd::chrono::microseconds exTime = AZStd::chrono::system_clock::now() - startTime; - //AZ_Printf("UnitTest::SystemAllocatorTest::deafult","Time: %d Ms\n",exTime.count()); ////////////////////////////////////////////////////////////////////////// AllocatorInstance::Destroy(); diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 9ddd6ebf6b..d778b90469 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -288,7 +288,7 @@ namespace Benchmark public: void Benchmark(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -335,7 +335,7 @@ namespace Benchmark public: void Benchmark(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); @@ -424,7 +424,7 @@ namespace Benchmark void Benchmark(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index 95b0626d7f..4efcd0d86e 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -981,7 +981,7 @@ namespace AZ::IO AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the // capture. Newer versions issue unused warning - auto callback = [numChunks, &numCallbacks, &waitForReads](FileRequestHandle request) + auto callback = [&numCallbacks, &waitForReads](FileRequestHandle request) AZ_POP_DISABLE_WARNING { IStreamer* streamer = Interface::Get(); @@ -1052,7 +1052,7 @@ namespace AZ::IO AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the // capture. Newer versions issue unused warning - auto callback = [numChunks, &waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request) + auto callback = [&waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request) AZ_POP_DISABLE_WARNING { numReadCallbacks++; @@ -1076,7 +1076,7 @@ namespace AZ::IO cancels.push_back(m_streamer->Cancel(requests[numChunks - i - 1])); AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the // capture. Newer versions issue unused warning - auto callback = [&numCancelCallbacks, &waitForCancels, numChunks](FileRequestHandle request) + auto callback = [&numCancelCallbacks, &waitForCancels](FileRequestHandle request) AZ_POP_DISABLE_WARNING { auto result = Interface::Get()->GetRequestStatus(request); @@ -1248,7 +1248,7 @@ namespace Benchmark AZStd::unique_ptr buffer(new char[FileSize]); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::binary_semaphore waitForReads; AZStd::atomic end; diff --git a/Code/Framework/AzCore/Tests/TaskTests.cpp b/Code/Framework/AzCore/Tests/TaskTests.cpp index 53fa89900e..7d805ce1f7 100644 --- a/Code/Framework/AzCore/Tests/TaskTests.cpp +++ b/Code/Framework/AzCore/Tests/TaskTests.cpp @@ -677,7 +677,7 @@ namespace Benchmark [] { }); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { TaskGraphEvent ev; graph->SubmitOnExecutor(*executor, &ev); @@ -699,7 +699,7 @@ namespace Benchmark }); a.Precedes(b); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { TaskGraphEvent ev; graph->SubmitOnExecutor(*executor, &ev); @@ -729,7 +729,7 @@ namespace Benchmark e.Follows(a, b, c, d); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { TaskGraphEvent ev; graph->SubmitOnExecutor(*executor, &ev); diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp index b0ef2f09a4..387a1abfe7 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp @@ -374,8 +374,6 @@ namespace AzFramework // is double-quoted, then the double-quotes must be escaped properly otherwise // it will be absorbed by the native argument parser and possibly evaluated as // multiple values for arguments - AZStd::string_view escapedDoubleQuote = R"("\")"; - AZStd::vector preprocessedCommandArray; for (const auto& commandArg : commandLineArray) diff --git a/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp b/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp index 64fba61e2c..7ab2638af6 100644 --- a/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp +++ b/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp @@ -142,7 +142,7 @@ namespace Benchmark BENCHMARK_F(BM_Octree, InsertDelete1000)(benchmark::State& state) { constexpr uint32_t EntryCount = 1000; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { InsertEntries(EntryCount); RemoveEntries(EntryCount); @@ -152,7 +152,7 @@ namespace Benchmark BENCHMARK_F(BM_Octree, InsertDelete10000)(benchmark::State& state) { constexpr uint32_t EntryCount = 10000; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { InsertEntries(EntryCount); RemoveEntries(EntryCount); @@ -162,7 +162,7 @@ namespace Benchmark BENCHMARK_F(BM_Octree, InsertDelete100000)(benchmark::State& state) { constexpr uint32_t EntryCount = 100000; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { InsertEntries(EntryCount); RemoveEntries(EntryCount); @@ -172,7 +172,7 @@ namespace Benchmark BENCHMARK_F(BM_Octree, InsertDelete1000000)(benchmark::State& state) { constexpr uint32_t EntryCount = 1000000; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { InsertEntries(EntryCount); RemoveEntries(EntryCount); @@ -183,7 +183,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -197,7 +197,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 10000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -211,7 +211,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 100000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -225,7 +225,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -239,7 +239,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -253,7 +253,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 10000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -267,7 +267,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 100000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -281,7 +281,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -295,7 +295,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -309,7 +309,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 10000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -323,7 +323,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 100000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { @@ -337,7 +337,7 @@ namespace Benchmark { constexpr uint32_t EntryCount = 1000000; InsertEntries(EntryCount); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (auto& queryData : m_queryDataArray) { diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 7e78f64778..26b9e13e18 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -276,7 +276,6 @@ namespace AzQtComponents */ void FancyDocking::updateDockingGeometry() { - QRect totalScreenRect; int numScreens = QApplication::screens().count(); #ifdef AZ_PLATFORM_WINDOWS @@ -286,6 +285,9 @@ namespace AzQtComponents m_perScreenFullScreenWidgets.clear(); #endif +#if !defined(AZ_PLATFORM_WINDOWS) + QRect totalScreenRect; +#endif for (int i = 0; i < numScreens; ++i) { #ifdef AZ_PLATFORM_WINDOWS diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabCreateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabCreateBenchmarks.cpp index 8cc5e5f4d2..debca753de 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabCreateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabCreateBenchmarks.cpp @@ -21,7 +21,7 @@ namespace Benchmark CreateFakePaths(numInstances); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -60,7 +60,7 @@ namespace Benchmark { const unsigned int numEntities = static_cast(state.range()); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -100,7 +100,7 @@ namespace Benchmark // plus the instance receiving them CreateFakePaths(numInstancesToAdd + 1); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -150,7 +150,7 @@ namespace Benchmark // plus the root instance CreateFakePaths(numInstances + 1); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp index f2f3cf82b0..cc1caf1a82 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp @@ -24,7 +24,7 @@ namespace Benchmark m_pathString); TemplateId templateToInstantiateId = firstInstance->GetTemplateId(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp index dd29654416..60e87a7a82 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp @@ -19,7 +19,7 @@ namespace Benchmark const unsigned int numTemplates = static_cast(state.range()); CreateFakePaths(numTemplates); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabUpdateInstancesBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabUpdateInstancesBenchmarks.cpp index 92a30b89f2..4f50da66c8 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabUpdateInstancesBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabUpdateInstancesBenchmarks.cpp @@ -24,7 +24,7 @@ namespace Benchmark const auto& nestedTemplatePath = m_paths.front(); const auto& enclosingTemplatePath = m_paths.back(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -85,7 +85,7 @@ namespace Benchmark const unsigned int numInstances = maxDepth; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -137,7 +137,7 @@ namespace Benchmark const unsigned int numInstances = numRootInstances * maxDepth; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); @@ -197,7 +197,7 @@ namespace Benchmark const unsigned int numInstances = (1 << maxDepth) - 1; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp index ba0c3a4838..a44ce6dd28 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp @@ -22,7 +22,7 @@ namespace Benchmark SetUpSpawnableAsset(entityCountInSourcePrefab); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); @@ -59,7 +59,7 @@ namespace Benchmark SetUpSpawnableAsset(entityCountInSpawnable); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); @@ -94,7 +94,7 @@ namespace Benchmark SetUpSpawnableAsset(entityCountInSpawnable); auto spawner = AzFramework::SpawnableEntitiesInterface::Get(); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { state.PauseTiming(); m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp index d9024114a5..e625a1ba0c 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp @@ -27,7 +27,7 @@ namespace Benchmark auto& prefabDom = m_prefabSystemComponent->FindTemplateDom(instance->GetTemplateId()); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { // Create a vector to store spawnables so that they don't get destroyed immediately after construction. AZStd::vector> spawnables; diff --git a/Code/Legacy/CrySystem/DebugCallStack.cpp b/Code/Legacy/CrySystem/DebugCallStack.cpp index 201582b949..440525d7c8 100644 --- a/Code/Legacy/CrySystem/DebugCallStack.cpp +++ b/Code/Legacy/CrySystem/DebugCallStack.cpp @@ -47,8 +47,6 @@ extern HMODULE gDLLHandle; static HWND hwndException = 0; static bool g_bUserDialog = true; // true=on crash show dialog box, false=supress user interaction -static int PrintException(EXCEPTION_POINTERS* pex); - static bool IsFloatingPointException(EXCEPTION_POINTERS* pex); extern LONG WINAPI CryEngineExceptionFilterWER(struct _EXCEPTION_POINTERS* pExceptionPointers); @@ -667,8 +665,6 @@ INT_PTR CALLBACK DebugCallStack::ExceptionDialogProc(HWND hwndDlg, UINT message, { static EXCEPTION_POINTERS* pex; - static char errorString[32768] = ""; - switch (message) { case WM_INITDIALOG: diff --git a/Code/Legacy/CrySystem/LocalizedStringManager.cpp b/Code/Legacy/CrySystem/LocalizedStringManager.cpp index c48baa95a7..b69fc539f9 100644 --- a/Code/Legacy/CrySystem/LocalizedStringManager.cpp +++ b/Code/Legacy/CrySystem/LocalizedStringManager.cpp @@ -2620,26 +2620,7 @@ namespace UnixTimeToFileTime(unixtime, &filetime); FileTimeToSystemTime(&filetime, systemtime); } - - time_t UnixTimeFromFileTime(const FILETIME* filetime) - { - LONGLONG longlong = filetime->dwHighDateTime; - longlong <<= 32; - longlong |= filetime->dwLowDateTime; - longlong -= 116444736000000000; - return longlong / 10000000; - } - - time_t UnixTimeFromSystemTime(const SYSTEMTIME* systemtime) - { - // convert systemtime to filetime - FILETIME filetime; - SystemTimeToFileTime(systemtime, &filetime); - // convert filetime to unixtime - time_t unixtime = UnixTimeFromFileTime(&filetime); - return unixtime; - } -}; +} void CLocalizedStringsManager::LocalizeTime(time_t t, bool bMakeLocalTime, bool bShowSeconds, AZStd::string& outTimeString) { diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp b/Code/Tools/TestImpactFramework/Frontend/Console/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp index a90f2cf4a2..428ab16f13 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp @@ -186,7 +186,7 @@ namespace TestImpact void TestRunCompleteCallback(const Client::TestRunBase& testRun, size_t numTestRunsCompleted, size_t totalNumTestRuns) { const auto progress = - AZStd::string::format("(%03u/%03u)", numTestRunsCompleted, totalNumTestRuns, testRun.GetTargetName().c_str()); + AZStd::string::format("(%03zu/%03zu)", numTestRunsCompleted, totalNumTestRuns); AZStd::string result; switch (testRun.GetResult()) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactClientSequenceReport.h b/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactClientSequenceReport.h index b668bda155..5c4ac76031 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactClientSequenceReport.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactClientSequenceReport.h @@ -391,57 +391,57 @@ namespace TestImpact // SequenceReport overrides ... AZStd::chrono::milliseconds GetDuration() const override { - return GetDuration() + m_draftedTestRunReport.GetDuration(); + return SequenceReportBase::GetDuration() + m_draftedTestRunReport.GetDuration(); } TestSequenceResult GetResult() const override { - return CalculateMultiTestSequenceResult({ GetResult(), m_draftedTestRunReport.GetResult() }); + return CalculateMultiTestSequenceResult({ SequenceReportBase::GetResult(), m_draftedTestRunReport.GetResult() }); } size_t GetTotalNumTestRuns() const override { - return GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns(); + return SequenceReportBase::GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns(); } size_t GetTotalNumPassingTests() const override { - return GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests(); + return SequenceReportBase::GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests(); } size_t GetTotalNumFailingTests() const override { - return GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests(); + return SequenceReportBase::GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests(); } size_t GetTotalNumDisabledTests() const override { - return GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests(); + return SequenceReportBase::GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests(); } size_t GetTotalNumPassingTestRuns() const override { - return GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns(); + return SequenceReportBase::GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns(); } size_t GetTotalNumFailingTestRuns() const override { - return GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns(); + return SequenceReportBase::GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns(); } size_t GetTotalNumExecutionFailureTestRuns() const override { - return GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns(); + return SequenceReportBase::GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns(); } size_t GetTotalNumTimedOutTestRuns() const override { - return GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns(); + return SequenceReportBase::GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns(); } size_t GetTotalNumUnexecutedTestRuns() const override { - return GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns(); + return SequenceReportBase::GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns(); } private: AZStd::vector m_draftedTestRuns; diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactRepoPath.h b/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactRepoPath.h index e784c43500..0cd01f73aa 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactRepoPath.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Include/TestImpactFramework/TestImpactRepoPath.h @@ -24,13 +24,13 @@ namespace TestImpact using value_type = AZ::IO::Path::value_type; constexpr RepoPath() = default; - constexpr RepoPath(const RepoPath&) = default; - constexpr RepoPath(RepoPath&&) noexcept = default; - constexpr RepoPath(const string_type& path) noexcept; - constexpr RepoPath(const string_view_type& path) noexcept; - constexpr RepoPath(const value_type* path) noexcept; - constexpr RepoPath(const AZ::IO::PathView& path); - constexpr RepoPath(const AZ::IO::Path& path); + RepoPath(const RepoPath&) = default; + RepoPath(RepoPath&&) noexcept = default; + RepoPath(const string_type& path) noexcept; + RepoPath(const string_view_type& path) noexcept; + RepoPath(const value_type* path) noexcept; + RepoPath(const AZ::IO::PathView& path); + RepoPath(const AZ::IO::Path& path); RepoPath& operator=(const RepoPath&) noexcept = default; RepoPath& operator=(const string_type&) noexcept; @@ -52,11 +52,11 @@ namespace TestImpact // Wrappers around the AZ::IO::Path concatenation operator friend RepoPath operator/(const RepoPath& lhs, const AZ::IO::PathView& rhs); friend RepoPath operator/(const RepoPath& lhs, AZStd::string_view rhs); - friend RepoPath operator/(const RepoPath& lhs, const typename value_type* rhs); + friend RepoPath operator/(const RepoPath& lhs, const value_type* rhs); friend RepoPath operator/(const RepoPath& lhs, const RepoPath& rhs); RepoPath& operator/=(const AZ::IO::PathView& rhs); RepoPath& operator/=(AZStd::string_view rhs); - RepoPath& operator/=(const typename value_type* rhs); + RepoPath& operator/=(const value_type* rhs); RepoPath& operator/=(const RepoPath& rhs); friend bool operator==(const RepoPath& lhs, const RepoPath& rhs) noexcept; @@ -67,27 +67,27 @@ namespace TestImpact AZ::IO::Path m_path; }; - constexpr RepoPath::RepoPath(const string_type& path) noexcept + inline RepoPath::RepoPath(const string_type& path) noexcept : m_path(AZ::IO::Path(path).MakePreferred()) { } - constexpr RepoPath::RepoPath(const string_view_type& path) noexcept + inline RepoPath::RepoPath(const string_view_type& path) noexcept : m_path(AZ::IO::Path(path).MakePreferred()) { } - constexpr RepoPath::RepoPath(const value_type* path) noexcept + inline RepoPath::RepoPath(const value_type* path) noexcept : m_path(AZ::IO::Path(path).MakePreferred()) { } - constexpr RepoPath::RepoPath(const AZ::IO::PathView& path) + inline RepoPath::RepoPath(const AZ::IO::PathView& path) : m_path(AZ::IO::Path(path).MakePreferred()) { } - constexpr RepoPath::RepoPath(const AZ::IO::Path& path) + inline RepoPath::RepoPath(const AZ::IO::Path& path) : m_path(AZ::IO::Path(path).MakePreferred()) { } diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp index f39cfaaf10..dfa8c9c49b 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp @@ -69,6 +69,7 @@ namespace TestImpact const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node) AZ_POP_DISABLE_WARNING { + AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value(); return AZStd::chrono::milliseconds(static_cast(AZStd::stof(duration) * 1000.f)); }; @@ -86,6 +87,7 @@ namespace TestImpact const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node) AZ_POP_DISABLE_WARNING { + AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used const AZStd::string status = node->first_attribute(Keys[StatusKey])->value(); if (status == Keys[RunKey]) { diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/Process/TestImpactWin32_Pipe.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/Process/TestImpactWin32_Pipe.h index 19c11dd4da..9f55ad6074 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/Process/TestImpactWin32_Pipe.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/Process/TestImpactWin32_Pipe.h @@ -24,8 +24,8 @@ namespace TestImpact public: Pipe(SECURITY_ATTRIBUTES& sa, HANDLE& stdChannel); Pipe(Pipe&& other) = delete; - Pipe(Pipe& other) = delete; - Pipe& operator=(Pipe& other) = delete; + Pipe(const Pipe& other) = delete; + Pipe& operator=(const Pipe& other) = delete; Pipe& operator=(Pipe&& other) = delete; //! Releases the child end of the pipe (not needed once parent has their end). diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h index 8144615aeb..c46edbbfb7 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h @@ -58,14 +58,14 @@ namespace TestImpact //! @param payloadMapProducer The client callback to be called when all jobs have finished to transform the work produced by each job into the desired output. //! @param jobCallback The client callback to be called when each job changes state. //! @return The result of the run sequence and the jobs with their associated payloads. - AZStd::pair> Execute( + AZStd::pair> Execute( const AZStd::vector& jobs, PayloadMapProducer payloadMapProducer, StdOutputRouting stdOutRouting, StdErrorRouting stdErrRouting, AZStd::optional jobTimeout, AZStd::optional runnerTimeout, - JobCallback jobCallback); + JobCallback jobCallback); private: ProcessScheduler m_processScheduler; @@ -82,17 +82,17 @@ namespace TestImpact } template - AZStd::pair> JobRunner::Execute( + AZStd::pair> JobRunner::Execute( const AZStd::vector& jobInfos, PayloadMapProducer payloadMapProducer, StdOutputRouting stdOutRouting, StdErrorRouting stdErrRouting, AZStd::optional jobTimeout, AZStd::optional runnerTimeout, - JobCallback jobCallback) + JobCallback jobCallback) { AZStd::vector processes; - AZStd::unordered_map> metas; + AZStd::unordered_map> metas; AZStd::vector jobs; jobs.reserve(jobInfos.size()); processes.reserve(jobInfos.size()); diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.cpp index c84700065f..75f02982c0 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.cpp @@ -162,7 +162,7 @@ namespace TestImpact { } - [[nodiscard]] ProcessCallbackResult operator()(const typename JobInfo& jobInfo, const TestImpact::JobMeta& meta) + [[nodiscard]] ProcessCallbackResult operator()(const JobInfo& jobInfo, const TestImpact::JobMeta& meta) { const auto id = jobInfo.GetId().m_value; const auto& args = jobInfo.GetCommand().m_args; @@ -189,7 +189,7 @@ namespace TestImpact private: const AZStd::vector& m_testTargets; - TestEngineJobMap* m_engineJobs; + TestEngineJobMap* m_engineJobs; Policy::ExecutionFailure m_executionFailurePolicy; Policy::TestFailure m_testFailurePolicy; AZStd::optional* m_callback; @@ -239,8 +239,7 @@ namespace TestImpact const RepoPath& testRunnerBinary, const RepoPath& instrumentBinary, size_t maxConcurrentRuns) - : m_maxConcurrentRuns(maxConcurrentRuns) - , m_testJobInfoGenerator(AZStd::make_unique( + : m_testJobInfoGenerator(AZStd::make_unique( sourceDir, targetBinaryDir, cacheDir, artifactDir, testRunnerBinary, instrumentBinary)) , m_testEnumerator(AZStd::make_unique(maxConcurrentRuns)) , m_instrumentedTestRunner(AZStd::make_unique(maxConcurrentRuns)) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.h index 6b097f241f..bba94e38b3 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/TestImpactTestEngine.h @@ -117,7 +117,6 @@ namespace TestImpact //! Cleans up the artifacts directory of any artifacts from previous runs. void DeleteArtifactXmls() const; - size_t m_maxConcurrentRuns = 0; AZStd::unique_ptr m_testJobInfoGenerator; AZStd::unique_ptr m_testEnumerator; AZStd::unique_ptr m_instrumentedTestRunner; diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactClientSequenceReportSerializer.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactClientSequenceReportSerializer.cpp index 944fd4ac38..65a5c88883 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactClientSequenceReportSerializer.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactClientSequenceReportSerializer.cpp @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -735,7 +736,11 @@ namespace TestImpact }; } - template + template, + AZStd::is_same, + AZStd::is_same + >>> PolicyStateType DeserializePolicyStateType(const rapidjson::Value& serialPolicyStateType) { if constexpr (AZStd::is_same_v) @@ -750,10 +755,6 @@ namespace TestImpact { return DeserializeImpactAnalysisSequencePolicyStateMembers(serialPolicyStateType); } - else - { - static_assert(false, "Template paramater must be a valid policy state type"); - } } template @@ -775,7 +776,7 @@ namespace TestImpact serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::MaxConcurrency]].GetUint64(), testTargetTimeout ? AZStd::optional{ testTargetTimeout } : AZStd::nullopt, globalTimeout ? AZStd::optional{ globalTimeout } : AZStd::nullopt, - DeserializePolicyStateType(serialSequenceReportBase), + DeserializePolicyStateType(serialSequenceReportBase), SuiteTypeFromString(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::Suite]].GetString()), DeserializeTestSelection(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRuns]]), DeserializeTestRunReport(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRunReport]])); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp index c988c4e14e..dcd4a2574c 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp @@ -113,7 +113,7 @@ namespace AZ if (!memoryView.IsValid()) { - RHI::ResultCode::OutOfMemory; + return RHI::ResultCode::OutOfMemory; } buffer->SetDescriptor(descriptor); diff --git a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom_RHI_Vulkan_Windows.h b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom_RHI_Vulkan_Windows.h index 2b2c2b015e..de5931f693 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom_RHI_Vulkan_Windows.h +++ b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom_RHI_Vulkan_Windows.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/Gems/Blast/Code/Source/Components/BlastFamilyComponent.h b/Gems/Blast/Code/Source/Components/BlastFamilyComponent.h index 99957d0fce..1a0e8135d9 100644 --- a/Gems/Blast/Code/Source/Components/BlastFamilyComponent.h +++ b/Gems/Blast/Code/Source/Components/BlastFamilyComponent.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include #include diff --git a/Gems/Blast/Code/Source/Family/DamageManager.h b/Gems/Blast/Code/Source/Family/DamageManager.h index ed8d03da18..28892074b0 100644 --- a/Gems/Blast/Code/Source/Family/DamageManager.h +++ b/Gems/Blast/Code/Source/Family/DamageManager.h @@ -83,7 +83,7 @@ namespace Blast static AZ::Vector3 TransformToLocal(BlastActor& actor, const AZ::Vector3& globalPosition); BlastMaterial m_blastMaterial; - ActorTracker& m_actorTracker; + [[maybe_unused]] ActorTracker& m_actorTracker; }; template diff --git a/Gems/EMotionFX/Code/MCore/Source/StringConversions.cpp b/Gems/EMotionFX/Code/MCore/Source/StringConversions.cpp index 88a22db245..5f57a036c2 100644 --- a/Gems/EMotionFX/Code/MCore/Source/StringConversions.cpp +++ b/Gems/EMotionFX/Code/MCore/Source/StringConversions.cpp @@ -76,11 +76,6 @@ namespace MCore namespace AZStd { - void to_string(string& str, bool value) - { - str = value ? "true" : "false"; - } - void to_string(string& str, const AZ::Vector2& value) { str = AZStd::string::format("%.8f,%.8f", diff --git a/Gems/EMotionFX/Code/MCore/Source/StringConversions.h b/Gems/EMotionFX/Code/MCore/Source/StringConversions.h index fd1c59208d..01b41091cf 100644 --- a/Gems/EMotionFX/Code/MCore/Source/StringConversions.h +++ b/Gems/EMotionFX/Code/MCore/Source/StringConversions.h @@ -49,7 +49,6 @@ namespace MCore namespace AZStd { - void to_string(string& str, bool value); void to_string(string& str, const AZ::Vector2& value); void to_string(string& str, const AZ::Vector3& value); void to_string(string& str, const AZ::Vector4& value); @@ -57,7 +56,6 @@ namespace AZStd void to_string(string& str, const AZ::Matrix4x4& value); void to_string(string& str, const AZ::Transform& value); - inline AZStd::string to_string(bool val) { AZStd::string str; to_string(str, val); return str; } inline AZStd::string to_string(const AZ::Vector2& val) { AZStd::string str; to_string(str, val); return str; } inline AZStd::string to_string(const AZ::Vector3& val) { AZStd::string str; to_string(str, val); return str; } inline AZStd::string to_string(const AZ::Vector4& val) { AZStd::string str; to_string(str, val); return str; } diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestHelpers.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalTestHelpers.cpp index d3c537ea1d..c05d34221b 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalTestHelpers.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestHelpers.cpp @@ -259,7 +259,7 @@ namespace UnitTest const float width = aznumeric_cast(queryRange); // Call GetValue() on the EBus for every height and width in our ranges. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (float y = 0.0f; y < height; y += 1.0f) { @@ -285,7 +285,7 @@ namespace UnitTest int64_t totalQueryPoints = queryRange * queryRange; // Call GetValues() for every height and width in our ranges. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { // Set up our vector of query positions. This is done inside the benchmark timing since we're counting the work to create // each query position in the single GetValue() call benchmarks, and will make the timing more directly comparable. @@ -313,7 +313,7 @@ namespace UnitTest const float width = aznumeric_cast(queryRange); // Call GetValue() through the GradientSampler for every height and width in our ranges. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (float y = 0.0f; y < height; y += 1.0f) { @@ -343,7 +343,7 @@ namespace UnitTest const int64_t totalQueryPoints = queryRange * queryRange; // Call GetValues() through the GradientSampler for every height and width in our ranges. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { // Set up our vector of query positions. This is done inside the benchmark timing since we're counting the work to create // each query position in the single GetValue() call benchmarks, and will make the timing more directly comparable. diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp index cd9e3c0395..55d7305a70 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp @@ -235,7 +235,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(CharacterConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < CharacterConstants::GameFramesToSimulate; i++) { @@ -294,7 +294,7 @@ namespace PhysX::Benchmarks AZStd::vector tickTimes; tickTimes.reserve(CharacterConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < CharacterConstants::GameFramesToSimulate; i++) { @@ -361,7 +361,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(CharacterConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { //run each simulation part, and change direction each time for (AZ::u32 i = 0; i < numDirectionChanges; i++) diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp index c82d222e80..e86125c1f5 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp @@ -198,7 +198,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(RagdollConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < RagdollConstants::GameFramesToSimulate; i++) { @@ -264,7 +264,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(RagdollConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < RagdollConstants::GameFramesToSimulate; i++) { diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXGenericBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXGenericBenchmarks.cpp index c2cf7f1246..1e556c3af7 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXGenericBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXGenericBenchmarks.cpp @@ -31,7 +31,7 @@ namespace PhysX::Benchmarks void BM_PhysXBenchmarkFixture(benchmark::State& state) { - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { auto fixture = std::make_unique(); fixture->SetUp(); diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp index de8a9d2146..8606735174 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp @@ -245,7 +245,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker Types::TimeList tickTimes; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < JointConstants::GameFramesToSimulate; i++) { @@ -300,7 +300,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker Types::TimeList tickTimes; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < JointConstants::GameFramesToSimulate; i++) { @@ -399,7 +399,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker Types::TimeList tickTimes; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < JointConstants::GameFramesToSimulate; i++) { diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp index 58cbd0da23..616c248667 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp @@ -229,7 +229,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker Types::TimeList tickTimes; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < RigidBodyConstants::GameFramesToSimulate; i++) { @@ -302,7 +302,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(RigidBodyConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < RigidBodyConstants::GameFramesToSimulate; i++) { @@ -471,7 +471,7 @@ namespace PhysX::Benchmarks //setup the frame timer tracker AZStd::vector tickTimes; tickTimes.reserve(RigidBodyConstants::GameFramesToSimulate); - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { for (AZ::u32 i = 0; i < RigidBodyConstants::GameFramesToSimulate; i++) { diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp index 9a8a28a85e..ba3f7aad40 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp @@ -141,7 +141,7 @@ namespace PhysX::Benchmarks auto* sceneInterface = AZ::Interface::Get(); auto next = 0; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { request.m_direction = m_boxes[next].GetNormalized(); @@ -175,7 +175,7 @@ namespace PhysX::Benchmarks auto* sceneInterface = AZ::Interface::Get(); auto next = 0; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { request.m_direction = m_boxes[next].GetNormalized(); @@ -206,7 +206,7 @@ namespace PhysX::Benchmarks auto* sceneInterface = AZ::Interface::Get(); auto next = 0; - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { request.m_pose = AZ::Transform::CreateTranslation(m_boxes[next]); diff --git a/Gems/SurfaceData/Code/Tests/SurfaceDataBenchmarks.cpp b/Gems/SurfaceData/Code/Tests/SurfaceDataBenchmarks.cpp index becb91f0ce..a507391ae6 100644 --- a/Gems/SurfaceData/Code/Tests/SurfaceDataBenchmarks.cpp +++ b/Gems/SurfaceData/Code/Tests/SurfaceDataBenchmarks.cpp @@ -181,7 +181,7 @@ namespace UnitTest SurfaceData::SurfaceTagVector filterTags = CreateBenchmarkTagFilterList(); // Query every point in our world at 1 meter intervals. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { // This is declared outside the loop so that the list of points doesn't fully reallocate on every query. SurfaceData::SurfacePointList points; @@ -211,7 +211,7 @@ namespace UnitTest SurfaceData::SurfaceTagVector filterTags = CreateBenchmarkTagFilterList(); // Query every point in our world at 1 meter intervals. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { SurfaceData::SurfacePointLists points; @@ -235,7 +235,7 @@ namespace UnitTest SurfaceData::SurfaceTagVector filterTags = CreateBenchmarkTagFilterList(); // Query every point in our world at 1 meter intervals. - for (auto _ : state) + for ([[maybe_unused]] auto _ : state) { AZStd::vector queryPositions; queryPositions.reserve(worldSizeInt * worldSizeInt); diff --git a/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp b/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp index 7327dc4158..c1222bb6dc 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp @@ -279,7 +279,7 @@ namespace UnitTest auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution, worldBounds); // Call the terrain API we're testing for every height and width in our ranges. - for (auto stateIterator : state) + for ([[maybe_unused]] auto stateIterator : state) { ApiCaller(queryResolution, worldBounds, sampler); }