maint(compression): pass args by reference
This commit is contained in:
parent
266e902411
commit
3b959ff397
@ -108,8 +108,8 @@ bool add_file(zipFile& zip_file, const std::string& filename,
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
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) {
|
bool archive::write(const std::string& filename, const std::string& comment) {
|
||||||
|
@ -11,7 +11,7 @@ std::string decompress(const std::string& data);
|
|||||||
namespace zip {
|
namespace zip {
|
||||||
class archive {
|
class archive {
|
||||||
public:
|
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 = {});
|
bool write(const std::string& filename, const std::string& comment = {});
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user