Skip to content

Commit

Permalink
Avoid copying LOGLEVELS for g3::logLevel call (#399)
Browse files Browse the repository at this point in the history
* Avoid copy-constructing LEVELS for logLevel call
  • Loading branch information
lukeocamden authored Jan 26, 2021
1 parent e28f559 commit 61f3f6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/g3log/loglevels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ namespace g3 {

#endif
/// Enabled status for the given logging level
bool logLevel(LEVELS level);
bool logLevel(const LEVELS& level);

} // g3
2 changes: 1 addition & 1 deletion src/loglevels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace g3 {
#endif


bool logLevel(LEVELS log_level) {
bool logLevel(const LEVELS& log_level) {
#ifdef G3_DYNAMIC_LOGGING
int level = log_level.value;
bool status = internal::g_log_levels[level].status.value();
Expand Down

0 comments on commit 61f3f6e

Please sign in to comment.