clang-tidy: don't assign in if
Found with bugprone-assignment-in-if-condition Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
d1a2cd0b76
commit
35b6780d02
@ -1290,9 +1290,9 @@ void Modify::delMetadatum(Exiv2::Image* pImage, const ModifyCmd& modifyCmd) {
|
||||
}
|
||||
}
|
||||
if (modifyCmd.metadataId_ == MetadataId::xmp) {
|
||||
Exiv2::XmpData::iterator pos;
|
||||
const Exiv2::XmpKey xmpKey(modifyCmd.key_);
|
||||
if ((pos = xmpData.findKey(xmpKey)) != xmpData.end()) {
|
||||
auto pos = xmpData.findKey(xmpKey);
|
||||
if (pos != xmpData.end()) {
|
||||
xmpData.eraseFamily(pos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -401,8 +401,8 @@ int IptcParser::decode(IptcData& iptcData, const byte* pData, size_t size) {
|
||||
pRead += 2;
|
||||
}
|
||||
if (sizeData <= static_cast<size_t>(pEnd - pRead)) {
|
||||
int rc = 0;
|
||||
if ((rc = readData(iptcData, dataSet, record, pRead, sizeData)) != 0) {
|
||||
int rc = readData(iptcData, dataSet, record, pRead, sizeData);
|
||||
if (rc != 0) {
|
||||
#ifndef SUPPRESS_WARNINGS
|
||||
EXV_WARNING << "Failed to read IPTC dataset " << IptcKey(dataSet, record) << " (rc = " << rc << "); skipped.\n";
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user