summaryrefslogtreecommitdiffhomepage
path: root/bench/loader.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-22 13:41:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-22 13:41:14 +0100
commita5c6ca806b2bde216effbea7cd5d964b3f235b5f (patch)
treebd859c8082ff1460c957d965aca9f485d97bc973 /bench/loader.cpp
parentbe44dc48469437370abab260fbd2c91a82109f9c (diff)
a
Diffstat (limited to 'bench/loader.cpp')
-rw-r--r--bench/loader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/bench/loader.cpp b/bench/loader.cpp
index 6e891ab7..ec0eed17 100644
--- a/bench/loader.cpp
+++ b/bench/loader.cpp
@@ -10,6 +10,8 @@ namespace floormat {
namespace {
+using nlohmann::json;
+
void Loader_json(benchmark::State& state)
{
loader.destroy();
@@ -17,7 +19,7 @@ void Loader_json(benchmark::State& state)
// warmup
{ for (const auto& x : loader.anim_atlas_list())
json_helper::from_json<anim_def>(Path::join(loader.ANIM_PATH, ""_s.join({x, ".json"})));
- json_helper::from_json<std::vector<nlohmann::json>>(Path::join(loader.VOBJ_PATH, "vobj.json"));
+ json_helper::from_json<std::vector<json>>(Path::join(loader.VOBJ_PATH, "vobj.json"));
}
for (auto _ : state)
@@ -25,7 +27,7 @@ void Loader_json(benchmark::State& state)
{
for (const auto& x : loader.anim_atlas_list())
json_helper::from_json<anim_def>(Path::join(loader.ANIM_PATH, ""_s.join({x, ".json"})));
- json_helper::from_json<std::vector<nlohmann::json>>(Path::join(loader.VOBJ_PATH, "vobj.json"));
+ json_helper::from_json<std::vector<json>>(Path::join(loader.VOBJ_PATH, "vobj.json"));
}
}