diff --git a/include/components/logger.hpp b/include/components/logger.hpp index 5c7d1ba2..0d270927 100644 --- a/include/components/logger.hpp +++ b/include/components/logger.hpp @@ -100,7 +100,7 @@ class logger { /** * Convert string */ - const char* convert(string arg) const; // NOLINT + const char* convert(const string& arg) const; /** * Convert thread id diff --git a/src/components/logger.cpp b/src/components/logger.cpp index f482eeaf..f1e968c8 100644 --- a/src/components/logger.cpp +++ b/src/components/logger.cpp @@ -1,6 +1,7 @@ +#include "components/logger.hpp" + #include -#include "components/logger.hpp" #include "errors.hpp" #include "settings.hpp" #include "utils/concurrency.hpp" @@ -12,7 +13,7 @@ POLYBAR_NS /** * Convert string */ -const char* logger::convert(string arg) const { // NOLINT +const char* logger::convert(const string& arg) const { return arg.c_str(); }