MCPcopy Create free account
hub / github.com/EasyRPG/Player / BM_SwitchRangeOp

Function BM_SwitchRangeOp

bench/switches.cpp:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45template <typename F>
46static void BM_SwitchRangeOp(benchmark::State& state, F&& op) {
47 auto s = make();
48 int i = 0;
49 for (auto _: state) {
50 op(s, i + 1, i);
51 i = (i + 1) % max_sws;
52 }
53}
54
55static void BM_SwitchSetRange(benchmark::State& state) {
56 BM_SwitchOp(state, [](auto& s, auto, bool val) { s.SetRange(1, max_sws, val); });

Callers

nothing calls this directly

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected