From 54dc515def5a5461c70981d65c56838371f28a44 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 14 Jan 2022 12:50:58 +0100 Subject: [PATCH] Util: Make file append const reference --- src/util/file.cpp | 2 +- src/util/file.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/file.cpp b/src/util/file.cpp index ee84c57..ecaa8cd 100644 --- a/src/util/file.cpp +++ b/src/util/file.cpp @@ -60,7 +60,7 @@ void File::clear() m_data.clear(); } -File& File::append(std::string data) +File& File::append(const std::string& data) { m_data.append(data); diff --git a/src/util/file.h b/src/util/file.h index fcbb90b..802acf5 100644 --- a/src/util/file.h +++ b/src/util/file.h @@ -19,7 +19,7 @@ public: static File create(const std::string& path); void clear(); - File& append(std::string data); + File& append(const std::string& data); File& replace(size_t index, size_t length, const std::string& data); File& flush();