Commit 27cc7676 authored by gabime's avatar gabime

Avoid un necessary move when popping circular_q

parent d52cf87d
...@@ -66,8 +66,8 @@ SPDLOG_INLINE void backtracer::foreach_pop(std::function<void(const details::log ...@@ -66,8 +66,8 @@ SPDLOG_INLINE void backtracer::foreach_pop(std::function<void(const details::log
while (!messages_.empty()) while (!messages_.empty())
{ {
auto &front_msg = messages_.front(); auto &front_msg = messages_.front();
messages_.pop_front();
fun(front_msg); fun(front_msg);
messages_.pop_front();
} }
} }
} // namespace details } // namespace details
......
...@@ -139,7 +139,7 @@ private: ...@@ -139,7 +139,7 @@ private:
filename_t current_file = filename(); filename_t current_file = filename();
if (filenames_q_.full()) if (filenames_q_.full())
{ {
auto &old_filename = filenames_q_.front(); auto old_filename = std::move(filenames_q_.front());
filenames_q_.pop_front(); filenames_q_.pop_front();
bool ok = remove_if_exists(old_filename) == 0; bool ok = remove_if_exists(old_filename) == 0;
if (!ok) if (!ok)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment