summaryrefslogtreecommitdiff
path: root/test/perf-assetFactory.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2025-04-28 09:37:00 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2025-04-28 09:37:00 +0100
commit0adc6ba15c8a44b23bfe7477ea94a746536329d7 (patch)
treea40404a3ceee30a863d0cc96c3713c5fd5f9402c /test/perf-assetFactory.cpp
parentFix all warnings in enumeration details code/tests (diff)
downloadilt-0adc6ba15c8a44b23bfe7477ea94a746536329d7.tar.bz2
ilt-0adc6ba15c8a44b23bfe7477ea94a746536329d7.tar.xz
ilt-0adc6ba15c8a44b23bfe7477ea94a746536329d7.zip
Fix all warnings in performance tests
Diffstat (limited to 'test/perf-assetFactory.cpp')
-rw-r--r--test/perf-assetFactory.cpp32
1 files changed, 17 insertions, 15 deletions
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 <benchmark/benchmark.h>
-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();