Skip to content

Commit f934fa3

Browse files
authored
template-ized Timer::run() (#8031)
1 parent 9dfee85 commit f934fa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/timer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ class CPPCHECKLIB Timer {
9191

9292
void stop();
9393

94-
static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const std::function<void()>& f) {
94+
template<class TFunc>
95+
static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const TFunc& f) {
9596
Timer t(std::move(str), showtimeMode, timerResults);
9697
f();
9798
}

0 commit comments

Comments
 (0)