From 571f36f1b61d316a2f2ace00fa94ba83ab1ac0a0 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 18 Jun 2018 18:54:54 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-pass-by-value=20?= =?UTF-8?q?pass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids having to pass variables by reference before copying them when calling a constructor. --- src/util/ziptool.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/util/ziptool.cpp') diff --git a/src/util/ziptool.cpp b/src/util/ziptool.cpp index fe64bad6f..4408c3daa 100644 --- a/src/util/ziptool.cpp +++ b/src/util/ziptool.cpp @@ -36,6 +36,7 @@ #include #include +#include #include "ziptool.h" @@ -1903,11 +1904,11 @@ ZipEntry::ZipEntry() : /** * */ -ZipEntry::ZipEntry(const std::string &fileNameArg, - const std::string &commentArg) : +ZipEntry::ZipEntry(std::string fileNameArg, + std::string commentArg) : crc (0L), - fileName (fileNameArg), - comment (commentArg), + fileName (std::move(fileNameArg)), + comment (std::move(commentArg)), compressionMethod (8), compressedData (), uncompressedData (), -- cgit v1.2.3