From 0adc6ba15c8a44b23bfe7477ea94a746536329d7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 28 Apr 2025 09:37:00 +0100 Subject: Fix all warnings in performance tests --- test/perf-assetFactory.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'test/perf-assetFactory.cpp') diff --git a/test/perf-assetFactory.cpp b/test/perf-assetFactory.cpp index 671713c..0f7895b 100644 --- a/test/perf-assetFactory.cpp +++ b/test/perf-assetFactory.cpp @@ -2,27 +2,29 @@ #include "testMainWindow.h" #include -static void -brush47xml_load(benchmark::State & state) -{ - TestMainWindowAppBase window; +namespace { + void + brush47xmlLoad(benchmark::State & state) + { + TestMainWindowAppBase window; - for (auto _ : state) { - benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); + for (auto loop : state) { + benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); + } } -} -static void -foliagexml_load(benchmark::State & state) -{ - TestMainWindowAppBase window; + void + foliagexmlLoad(benchmark::State & state) + { + TestMainWindowAppBase window; - for (auto _ : state) { - benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/foliage.xml")); + for (auto loop : state) { + benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/foliage.xml")); + } } } -BENCHMARK(brush47xml_load); -BENCHMARK(foliagexml_load); +BENCHMARK(brush47xmlLoad); +BENCHMARK(foliagexmlLoad); BENCHMARK_MAIN(); -- cgit v1.2.3