clang-tidy: pass by value
Found with modernize-pass-by-value Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
f9d394adf0
commit
8564d0b394
@ -287,7 +287,7 @@ namespace Exiv2 {
|
||||
the remaining parts of the key cannot be parsed and
|
||||
converted to a record name and a dataset name.
|
||||
*/
|
||||
explicit IptcKey(const std::string& key);
|
||||
explicit IptcKey(std::string key);
|
||||
/*!
|
||||
@brief Constructor to create an IPTC key from dataset and record ids.
|
||||
@param tag Dataset id
|
||||
|
||||
@ -147,7 +147,7 @@ namespace Exiv2 {
|
||||
|
||||
private:
|
||||
//! Private constructor
|
||||
PreviewImage(const PreviewProperties& properties, DataBuf data);
|
||||
PreviewImage(PreviewProperties properties, DataBuf data);
|
||||
|
||||
PreviewProperties properties_; //!< Preview image properties
|
||||
byte* pData_; //!< Pointer to the preview image data
|
||||
|
||||
@ -59,14 +59,14 @@ namespace Exiv2 {
|
||||
//! For comparison with prefix
|
||||
struct Prefix {
|
||||
//! Constructor.
|
||||
explicit Prefix(const std::string& prefix);
|
||||
explicit Prefix(std::string prefix);
|
||||
//! The prefix string.
|
||||
std::string prefix_;
|
||||
};
|
||||
//! For comparison with namespace
|
||||
struct Ns {
|
||||
//! Constructor.
|
||||
explicit Ns(const std::string& ns);
|
||||
explicit Ns(std::string ns);
|
||||
//! The namespace string
|
||||
std::string ns_;
|
||||
};
|
||||
|
||||
@ -66,7 +66,7 @@ namespace Exiv2 {
|
||||
|
||||
//! Search key to find a GroupInfo by its group name.
|
||||
struct EXIV2API GroupInfo::GroupName {
|
||||
explicit GroupName(const std::string& groupName);
|
||||
explicit GroupName(std::string groupName);
|
||||
std::string g_; //!< Group name
|
||||
};
|
||||
|
||||
|
||||
@ -634,7 +634,7 @@ namespace Jzon
|
||||
return new Array(*this);
|
||||
}
|
||||
|
||||
FileWriter::FileWriter(const std::string &filename) : filename(filename)
|
||||
FileWriter::FileWriter(std::string filename) : filename(std::move(filename))
|
||||
{
|
||||
}
|
||||
FileWriter::~FileWriter() = default;
|
||||
|
||||
@ -343,10 +343,10 @@ namespace Jzon
|
||||
class JzonAPI FileWriter
|
||||
{
|
||||
public:
|
||||
FileWriter(const std::string &filename);
|
||||
~FileWriter();
|
||||
FileWriter(std::string filename);
|
||||
~FileWriter();
|
||||
|
||||
static void WriteFile(const std::string &filename, const Node &root, const Format &format = NoFormat);
|
||||
static void WriteFile(const std::string &filename, const Node &root, const Format &format = NoFormat);
|
||||
|
||||
void Write(const Node &root, const Format &format = NoFormat);
|
||||
|
||||
|
||||
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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_;
|
||||
|
||||
@ -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))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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;
|
||||
//@}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user