Skip to content

Commit ae2d011

Browse files
committed
clazy: trivial types to value
Signed-off-by: Rosen Penev <[email protected]>
1 parent 7d6b1a5 commit ae2d011

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/convert.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bool convertStringCharsetWindows(std::string& str, std::string_view from, std::s
5959
exactly one entry, \em value is set to this entry, without the qualifier.
6060
The return code indicates if the operation was successful.
6161
*/
62-
bool getTextValue(std::string& value, const Exiv2::XmpData::iterator& pos);
62+
bool getTextValue(std::string& value, Exiv2::XmpData::iterator pos);
6363
} // namespace
6464

6565
// *****************************************************************************
@@ -1586,7 +1586,7 @@ bool convertStringCharsetWindows(std::string& str, std::string_view from, std::s
15861586
}
15871587

15881588
#endif // EXV_HAVE_ICONV
1589-
bool getTextValue(std::string& value, const XmpData::iterator& pos) {
1589+
bool getTextValue(std::string& value, XmpData::iterator pos) {
15901590
if (pos->typeId() == langAlt) {
15911591
// get the default language entry without x-default qualifier
15921592
value = pos->toString(0);

src/tiffimage_int.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class TiffHeader : public TiffHeaderBase {
140140
using TiffGroupKey = std::pair<uint32_t, IfdId>;
141141

142142
struct TiffGroupKey_hash {
143-
std::size_t operator()(const TiffGroupKey& pair) const noexcept {
143+
std::size_t operator()(TiffGroupKey pair) const noexcept {
144144
return std::hash<uint64_t>{}(static_cast<uint64_t>(pair.first) << 32 | static_cast<uint64_t>(pair.second));
145145
}
146146
};

src/xmp.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,16 @@ class FindXmpdatum {
206206

207207
#ifdef EXV_HAVE_XMP_TOOLKIT
208208
//! Convert XMP Toolkit struct option bit to Value::XmpStruct
209-
Exiv2::XmpValue::XmpStruct xmpStruct(const XMP_OptionBits& opt);
209+
Exiv2::XmpValue::XmpStruct xmpStruct(XMP_OptionBits opt);
210210

211211
//! Convert Value::XmpStruct to XMP Toolkit array option bits
212212
XMP_OptionBits xmpArrayOptionBits(Exiv2::XmpValue::XmpStruct xs);
213213

214214
//! Convert XMP Toolkit array option bits to array TypeId
215-
Exiv2::TypeId arrayValueTypeId(const XMP_OptionBits& opt);
215+
Exiv2::TypeId arrayValueTypeId(XMP_OptionBits opt);
216216

217217
//! Convert XMP Toolkit array option bits to Value::XmpArrayType
218-
Exiv2::XmpValue::XmpArrayType xmpArrayType(const XMP_OptionBits& opt);
218+
Exiv2::XmpValue::XmpArrayType xmpArrayType(XMP_OptionBits opt);
219219

220220
//! Convert Value::XmpArrayType to XMP Toolkit array option bits
221221
XMP_OptionBits xmpArrayOptionBits(Exiv2::XmpValue::XmpArrayType xat);
@@ -225,7 +225,7 @@ XMP_OptionBits xmpFormatOptionBits(Exiv2::XmpParser::XmpFormatFlags flags);
225225

226226
//! Print information about a parsed XMP node
227227
void printNode(const std::string& schemaNs, const std::string& propPath, const std::string& propValue,
228-
const XMP_OptionBits& opt);
228+
XMP_OptionBits opt);
229229

230230
//! Make an XMP key from a schema namespace and property path
231231
Exiv2::XmpKey::UniquePtr makeXmpKey(const std::string& schemaNs, const std::string& propPath);
@@ -904,7 +904,7 @@ int XmpParser::encode(std::string& /*xmpPacket*/, const XmpData& xmpData, uint16
904904
// local definitions
905905
namespace {
906906
#ifdef EXV_HAVE_XMP_TOOLKIT
907-
Exiv2::XmpValue::XmpStruct xmpStruct(const XMP_OptionBits& opt) {
907+
Exiv2::XmpValue::XmpStruct xmpStruct(XMP_OptionBits opt) {
908908
Exiv2::XmpValue::XmpStruct var(Exiv2::XmpValue::xsNone);
909909
if (XMP_PropIsStruct(opt)) {
910910
var = Exiv2::XmpValue::xsStruct;
@@ -924,7 +924,7 @@ XMP_OptionBits xmpArrayOptionBits(Exiv2::XmpValue::XmpStruct xs) {
924924
return var;
925925
}
926926

927-
Exiv2::TypeId arrayValueTypeId(const XMP_OptionBits& opt) {
927+
Exiv2::TypeId arrayValueTypeId(XMP_OptionBits opt) {
928928
Exiv2::TypeId typeId(Exiv2::invalidTypeId);
929929
if (XMP_PropIsArray(opt)) {
930930
if (XMP_ArrayIsAlternate(opt))
@@ -937,7 +937,7 @@ Exiv2::TypeId arrayValueTypeId(const XMP_OptionBits& opt) {
937937
return typeId;
938938
}
939939

940-
Exiv2::XmpValue::XmpArrayType xmpArrayType(const XMP_OptionBits& opt) {
940+
Exiv2::XmpValue::XmpArrayType xmpArrayType(XMP_OptionBits opt) {
941941
return Exiv2::XmpValue::xmpArrayType(arrayValueTypeId(opt));
942942
}
943943

@@ -986,7 +986,7 @@ XMP_OptionBits xmpFormatOptionBits(Exiv2::XmpParser::XmpFormatFlags flags) {
986986

987987
#ifdef EXIV2_DEBUG_MESSAGES
988988
void printNode(const std::string& schemaNs, const std::string& propPath, const std::string& propValue,
989-
const XMP_OptionBits& opt) {
989+
XMP_OptionBits opt) {
990990
static bool first = true;
991991
if (first) {
992992
first = false;
@@ -1041,7 +1041,7 @@ void printNode(const std::string& schemaNs, const std::string& propPath, const s
10411041
std::cout << '\n';
10421042
}
10431043
#else
1044-
void printNode(const std::string&, const std::string&, const std::string&, const XMP_OptionBits&) {
1044+
void printNode(const std::string&, const std::string&, const std::string&, XMP_OptionBits) {
10451045
}
10461046
#endif // EXIV2_DEBUG_MESSAGES
10471047

0 commit comments

Comments
 (0)