Skip to content

Commit

Permalink
scoped_timer: fix moved string
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch committed Feb 12, 2025
1 parent b2058c8 commit 659d088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace utl {

scoped_timer::scoped_timer(std::string name)
: name_{std::move(name)}, start_{std::chrono::steady_clock::now()} {
utl::log_info("scoped_timer", "[{}] starting", name);
utl::log_info("scoped_timer", "[{}] starting", name_);
}

scoped_timer::~scoped_timer() {
Expand Down Expand Up @@ -50,4 +50,4 @@ void manual_timer::print(std::string_view const message) const {
utl::log_info("scoped_timer", "[{}] {} ({}ms)", name_, message, t);
}

} // namespace utl
} // namespace utl

0 comments on commit 659d088

Please sign in to comment.