clang-tidy: simplify bool
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
133849c394
commit
63e41c3aeb
@ -345,11 +345,10 @@ namespace Exiv2::Internal {
|
||||
append(blob, reinterpret_cast<const byte*>(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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user