clang-tidy: pass by value
Found with modernize-pass-by-value Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Luis Díaz Más
parent
f9d394adf0
commit
8564d0b394
+12
-7
@@ -81,7 +81,7 @@ namespace Exiv2 {
|
||||
class FileIo::Impl {
|
||||
public:
|
||||
//! Constructor
|
||||
Impl(const std::string& path);
|
||||
Impl(std::string path);
|
||||
#ifdef EXV_UNICODE_PATH
|
||||
//! Constructor accepting a unicode path in an std::wstring
|
||||
Impl(const std::wstring& wpath);
|
||||
@@ -141,16 +141,21 @@ namespace Exiv2 {
|
||||
Impl& operator=(const Impl& rhs) = delete; //!< Assignment
|
||||
}; // class FileIo::Impl
|
||||
|
||||
FileIo::Impl::Impl(const std::string& path)
|
||||
: path_(path),
|
||||
FileIo::Impl::Impl(std::string path)
|
||||
: path_(std::move(path)),
|
||||
#ifdef EXV_UNICODE_PATH
|
||||
wpMode_(wpStandard),
|
||||
wpMode_(wpStandard),
|
||||
#endif
|
||||
fp_(0), opMode_(opSeek),
|
||||
fp_(0),
|
||||
opMode_(opSeek),
|
||||
#if defined WIN32 && !defined __CYGWIN__
|
||||
hFile_(0), hMap_(0),
|
||||
hFile_(0),
|
||||
hMap_(0),
|
||||
#endif
|
||||
pMappedArea_(0), mappedLength_(0), isMalloced_(false), isWriteable_(false)
|
||||
pMappedArea_(0),
|
||||
mappedLength_(0),
|
||||
isMalloced_(false),
|
||||
isWriteable_(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -583,8 +583,7 @@ namespace Exiv2 {
|
||||
|
||||
const char* IptcKey::familyName_ = "Iptc";
|
||||
|
||||
IptcKey::IptcKey(const std::string& key)
|
||||
: key_(key)
|
||||
IptcKey::IptcKey(std::string key) : key_(std::move(key))
|
||||
{
|
||||
decomposeKey();
|
||||
}
|
||||
|
||||
+1
-3
@@ -1031,9 +1031,7 @@ namespace {
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exiv2 {
|
||||
|
||||
PreviewImage::PreviewImage(const PreviewProperties& properties, DataBuf data)
|
||||
: properties_(properties)
|
||||
PreviewImage::PreviewImage(PreviewProperties properties, DataBuf data) : properties_(std::move(properties))
|
||||
{
|
||||
pData_ = data.pData_;
|
||||
size_ = data.size_;
|
||||
|
||||
+2
-4
@@ -2447,13 +2447,11 @@ namespace Exiv2 {
|
||||
{"Xmp.plus.Reuse", EXV_PRINT_VOCABULARY(plusReuse) }
|
||||
};
|
||||
|
||||
XmpNsInfo::Ns::Ns(const std::string& ns)
|
||||
: ns_(ns)
|
||||
XmpNsInfo::Ns::Ns(std::string ns) : ns_(std::move(ns))
|
||||
{
|
||||
}
|
||||
|
||||
XmpNsInfo::Prefix::Prefix(const std::string& prefix)
|
||||
: prefix_(prefix)
|
||||
XmpNsInfo::Prefix::Prefix(std::string prefix) : prefix_(std::move(prefix))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ namespace Exiv2 {
|
||||
namespace Exiv2 {
|
||||
|
||||
//! @cond IGNORE
|
||||
GroupInfo::GroupName::GroupName(const std::string& groupName): g_(groupName)
|
||||
GroupInfo::GroupName::GroupName(std::string groupName) : g_(std::move(groupName))
|
||||
{
|
||||
}
|
||||
//! @endcond
|
||||
|
||||
+4
-11
@@ -555,17 +555,10 @@ namespace Exiv2 {
|
||||
decodeTiffEntry(object);
|
||||
}
|
||||
|
||||
TiffEncoder::TiffEncoder(
|
||||
const ExifData& exifData,
|
||||
const IptcData& iptcData,
|
||||
const XmpData& xmpData,
|
||||
TiffComponent* pRoot,
|
||||
const bool isNewImage,
|
||||
const PrimaryGroups* pPrimaryGroups,
|
||||
const TiffHeaderBase* pHeader,
|
||||
FindEncoderFct findEncoderFct
|
||||
)
|
||||
: exifData_(exifData),
|
||||
TiffEncoder::TiffEncoder(ExifData exifData, const IptcData& iptcData, const XmpData& xmpData, TiffComponent* pRoot,
|
||||
const bool isNewImage, const PrimaryGroups* pPrimaryGroups, const TiffHeaderBase* pHeader,
|
||||
FindEncoderFct findEncoderFct)
|
||||
: exifData_(std::move(exifData)),
|
||||
iptcData_(iptcData),
|
||||
xmpData_(xmpData),
|
||||
del_(true),
|
||||
|
||||
+3
-10
@@ -383,16 +383,9 @@ namespace Exiv2 {
|
||||
to, the image with the metadata to encode and a function to
|
||||
find special encoders.
|
||||
*/
|
||||
TiffEncoder(
|
||||
const ExifData& exifData,
|
||||
const IptcData& iptcData,
|
||||
const XmpData& xmpData,
|
||||
TiffComponent* pRoot,
|
||||
const bool isNewImage,
|
||||
const PrimaryGroups* pPrimaryGroups,
|
||||
const TiffHeaderBase* pHeader,
|
||||
FindEncoderFct findEncoderFct
|
||||
);
|
||||
TiffEncoder(ExifData exifData, const IptcData& iptcData, const XmpData& xmpData, TiffComponent* pRoot,
|
||||
const bool isNewImage, const PrimaryGroups* pPrimaryGroups, const TiffHeaderBase* pHeader,
|
||||
FindEncoderFct findEncoderFct);
|
||||
//! Virtual destructor
|
||||
virtual ~TiffEncoder() = default;
|
||||
//@}
|
||||
|
||||
Reference in New Issue
Block a user