aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 11:30:51 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 11:30:51 +0200
commit30d84ef9ad4a0010288db18294766fd4d5ed6f4a (patch)
treeb34e69fbded9c0e1a3255f7a5d4fe09d6015873d /src/crepe
parent0fdebc7d7a143ad2b9b5ed6a596bf4bb1f0f7d7f (diff)
incorporate feedback
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/util/log.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/util/log.cpp b/src/crepe/util/log.cpp
index f012c67..0c2ce1e 100644
--- a/src/crepe/util/log.cpp
+++ b/src/crepe/util/log.cpp
@@ -15,13 +15,13 @@ static const char * const LOG_PREFIX[] = {
[log_level::ERROR] = "[ERR] ",
};
-static void log(enum log_level level, const std::string msg) {
+static void log(enum log_level level, const std::string & msg) {
using namespace std;
- string final = string(LOG_PREFIX[level]) + msg;
- if (!final.ends_with("\n")) final += "\n";
+ string out = string(LOG_PREFIX[level]) + msg;
+ if (!out.ends_with("\n")) out += "\n";
// TODO: also log to file or smth
- printf("%s", final.c_str());
+ printf("%s", out.c_str());
fflush(stdout);
}