abumq / easyloggingpp

C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

Fix creation of unnecessary temporary #806

Closed vr-dada closed 2 years ago

vr-dada commented 2 years ago

A reference to a value type of a std::unordered_map has a const key within the corresponding pair. Using a std::pair<std::string... therefore causes the creation of such a pair out of the loop variable. Clang reports this.

This is a

I have

simoc commented 2 years ago

These changes are already included in #771, that is also waiting to be merged to master.

vr-dada commented 2 years ago

Oh my bad, haven't found this. Thanks for the feedback!