maint(compression): pass args by reference

Co-authored-by: William Roy <wroy@proton.me>
This commit is contained in:
2023-05-26 19:19:43 +02:00
parent cf3a4e18e6
commit beb90226fe
3 changed files with 4 additions and 4 deletions

View File

@@ -134,9 +134,9 @@ namespace utils::compression
}
}
void archive::add(std::string filename, std::string data)
void archive::add(const std::string& filename, const std::string& data)
{
this->files_[std::move(filename)] = std::move(data);
this->files_[filename] = data;
}
bool archive::write(const std::string& filename, const std::string& comment)

View File

@@ -18,7 +18,7 @@ namespace utils::compression
class archive
{
public:
void add(std::string filename, std::string data);
void add(const std::string& filename, const std::string& data);
bool write(const std::string& filename, const std::string& comment = {});
private: