diff --git a/src/files/files.cpp b/src/files/files.cpp index 4c4d4ffd..3c0a7fe4 100644 --- a/src/files/files.cpp +++ b/src/files/files.cpp @@ -103,7 +103,7 @@ std::string files::read_string(const fs::path& filename) { return std::string((const char*)bytes.get(), size); } -bool files::write_string(const fs::path& filename, const std::string content) { +bool files::write_string(const fs::path& filename, const std::string& content) { std::ofstream file(filename); if (!file) { return false; diff --git a/src/files/files.hpp b/src/files/files.hpp index 1a124b25..5c3cd0b2 100644 --- a/src/files/files.hpp +++ b/src/files/files.hpp @@ -40,7 +40,7 @@ namespace files { uint append_bytes(const fs::path& file, const ubyte* data, size_t size); /// @brief Write string to the file - bool write_string(const fs::path& filename, const std::string content); + bool write_string(const fs::path& filename, const std::string& content); /// @brief Write dynamic data to the JSON file /// @param nice if true, human readable format will be used, otherwise minimal