fix: optimization: PVS-Studio warning V801

Redefined the second function argument as a const reference instead of by value to improve performance.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov
2024-08-02 06:18:05 +03:00
committed by Pugemon
parent c3e4341a04
commit 35d26a771f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;