From 21e0defdd3c0d56e546b1a2c3074d862917c2d72 Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 13 Dec 2025 04:40:51 +0100 Subject: [PATCH] timer.h: template-ized `Timer::run()` --- lib/timer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/timer.h b/lib/timer.h index ae686b7b3e7..991b334f3aa 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -91,7 +91,8 @@ class CPPCHECKLIB Timer { void stop(); - static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const std::function& f) { + template + static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const TFunc& f) { Timer t(std::move(str), showtimeMode, timerResults); f(); }