cpp : Removed redundant keywords and replaced macros with constant expressions

This commit is contained in:
saundersp
2025-08-21 01:38:41 +02:00
parent c55dd14a89
commit 014326b1e3
8 changed files with 92 additions and 90 deletions

View File

@@ -86,7 +86,7 @@ T benchmark_function(const char* const step_name, const int32_t& column_width, c
#endif
const std::chrono::system_clock::time_point start = perf_counter_ns();
const T res = fnc(std::forward<Args>(args)...);
const long long time_spent = duration_ns(perf_counter_ns() - start);
const int64_t time_spent = duration_ns(perf_counter_ns() - start);
formatted_row<3>({ column_width, -18, 29 }, { step_name, thousand_sep(time_spent).c_str(), format_time_ns(time_spent).c_str() });
return res;
}
@@ -109,7 +109,7 @@ void benchmark_function_void(const char* const step_name, const int32_t& column_
#endif
const std::chrono::system_clock::time_point start = perf_counter_ns();
fnc(std::forward<Args>(args)...);
const long long time_spent = duration_ns(perf_counter_ns() - start);
const int64_t time_spent = duration_ns(perf_counter_ns() - start);
formatted_row<3>({ column_width, -18, 29 }, { step_name, thousand_sep(time_spent).c_str(), format_time_ns(time_spent).c_str() });
}