[clang-tidy] performance

Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-02 17:07:36 -07:00
committed by Fabian Homborg
parent 8d3377e923
commit 194fa4a548
7 changed files with 12 additions and 12 deletions

View File

@@ -201,13 +201,13 @@ wcstring timer_snapshot_t::print_delta(timer_snapshot_t t1, timer_snapshot_t t2,
static std::vector<timer_snapshot_t> active_timers;
static void pop_timer() {
auto t1 = std::move(active_timers.back());
auto t1 = active_timers.back();
active_timers.pop_back();
auto t2 = timer_snapshot_t::take();
// Well, this is awkward. By defining `time` as a decorator and not a built-in, there's
// no associated stream for its output!
auto output = timer_snapshot_t::print_delta(std::move(t1), std::move(t2), true);
auto output = timer_snapshot_t::print_delta(t1, t2, true);
std::fwprintf(stderr, L"%S\n", output.c_str());
}