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 9781b60543..ecf6873052 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 @@ -18,10 +18,6 @@ #include #include -#if defined(HAVE_BENCHMARK) -#include -#endif - #include #include @@ -1155,7 +1151,10 @@ namespace AZ::IO } } // namespace AZ::IO -#ifdef HAVE_BENCHMARK +#if defined(HAVE_BENCHMARK) + +#include + namespace Benchmark { class StorageDriveWindowsFixture : public benchmark::Fixture @@ -1259,7 +1258,8 @@ namespace Benchmark BENCHMARK_DEFINE_F(StorageDriveWindowsFixture, ReadsBaseline)(benchmark::State& state) { - SetupStreamer(false); + constexpr bool EnableFileSharing = false; + SetupStreamer(EnableFileSharing); RepeatedlyReadFile(state); } @@ -1267,7 +1267,8 @@ namespace Benchmark { using namespace AZ::IO; - SetupStreamer(true); + constexpr bool EnableFileSharing = true; + SetupStreamer(EnableFileSharing); RepeatedlyReadFile(state); }