From 12dd000f0bb7449510b2f9d8fac4bd82736d829f Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sun, 19 Sep 2021 11:46:19 +0200 Subject: [PATCH] Util: Pass string by const reference --- src/util/shell.cpp | 2 +- src/util/shell.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/shell.cpp b/src/util/shell.cpp index 12f06d4..128e8a3 100644 --- a/src/util/shell.cpp +++ b/src/util/shell.cpp @@ -10,7 +10,7 @@ Shell::Shell() { } -Shell::Shell(std::string output, int status) +Shell::Shell(const std::string& output, int status) : m_output(output) , m_status(status) { diff --git a/src/util/shell.h b/src/util/shell.h index 8b20003..a272f6d 100644 --- a/src/util/shell.h +++ b/src/util/shell.h @@ -19,7 +19,7 @@ public: int status() const { return m_status; } private: - Shell(std::string output, int status); + Shell(const std::string& output, int status); std::string m_output; int m_status { 0 };