diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp index ab6c4753..7d9274ce 100644 --- a/src/crwimage_int.cpp +++ b/src/crwimage_int.cpp @@ -345,11 +345,10 @@ namespace Exiv2::Internal { append(blob, reinterpret_cast(signature_), 8); o += 8; // Pad as needed - if (pPadding_.empty() == false) { + if (!pPadding_.empty()) { assert(padded_ == offset_ - o); append(blob, pPadding_.data(), padded_); - } - else { + } else { for (uint32_t i = o; i < offset_; ++i) { blob.push_back(0); ++o; diff --git a/src/pngimage.cpp b/src/pngimage.cpp index d2f2f36c..b82e6bee 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -681,22 +681,17 @@ namespace Exiv2 { } else if (!strcmp(szChunk, "tEXt") || !strcmp(szChunk, "zTXt") || !strcmp(szChunk, "iTXt") || !strcmp(szChunk, "iCCP")) { DataBuf key = PngChunk::keyTXTChunk(chunkBuf, true); - if (key.empty() == false && ( - compare("Raw profile type exif", key, 21) || - compare("Raw profile type APP1", key, 21) || - compare("Raw profile type iptc", key, 21) || - compare("Raw profile type xmp", key, 20) || - compare("XML:com.adobe.xmp", key, 17) || - compare("icc", key, 3) || // see test/data/imagemagick.png - compare("ICC", key, 3) || - compare("Description", key, 11))) - { + if (!key.empty() && + (compare("Raw profile type exif", key, 21) || compare("Raw profile type APP1", key, 21) || + compare("Raw profile type iptc", key, 21) || compare("Raw profile type xmp", key, 20) || + compare("XML:com.adobe.xmp", key, 17) || + compare("icc", key, 3) || // see test/data/imagemagick.png + compare("ICC", key, 3) || compare("Description", key, 11))) { #ifdef EXIV2_DEBUG_MESSAGES std::cout << "Exiv2::PngImage::doWriteMetadata: strip " << szChunk << " chunk (length: " << dataOffset << ")" << std::endl; #endif - } else - { + } else { #ifdef EXIV2_DEBUG_MESSAGES std::cout << "Exiv2::PngImage::doWriteMetadata: write " << szChunk << " chunk (length: " << dataOffset << ")" << std::endl;