diff --git a/app/actions.cpp b/app/actions.cpp index 06285aee34..80667a500d 100644 --- a/app/actions.cpp +++ b/app/actions.cpp @@ -1688,8 +1688,7 @@ std::string temporaryPath() { int metacopy(const std::string& source, const std::string& tgt, Exiv2::ImageType targetType, bool preserve) { #ifdef EXIV2_DEBUG_MESSAGES - std::cerr << "actions.cpp::metacopy" - << " source = " << source << " target = " << tgt << '\n'; + std::cerr << "actions.cpp::metacopy source = " << source << " target = " << tgt << '\n'; #endif // read the source metadata diff --git a/include/exiv2/datasets.hpp b/include/exiv2/datasets.hpp index 5872a5c444..71854ba01c 100644 --- a/include/exiv2/datasets.hpp +++ b/include/exiv2/datasets.hpp @@ -39,7 +39,7 @@ struct EXIV2API DataSet { TypeId type_; //!< Exiv2 default type uint16_t recordId_; //!< Record id const char* photoshop_; //!< Photoshop string -}; // struct DataSet +}; //! IPTC dataset reference, implemented as a static class. class EXIV2API IptcDataSets { diff --git a/include/exiv2/matroskavideo.hpp b/include/exiv2/matroskavideo.hpp index 6861fc4c45..234a948e9b 100644 --- a/include/exiv2/matroskavideo.hpp +++ b/include/exiv2/matroskavideo.hpp @@ -87,9 +87,8 @@ struct MatroskaTag { return _process == Composite; } void dump(std::ostream& os) const { - os << " MatroskaTag " - << " id: [0x" << std::hex << _id << "] label:[" << _label << "] type:[" << _type << "] process :[" << _process - << "]\n"; + os << " MatroskaTag id: [0x" << std::hex << _id << "] label:[" << _label << "] type:[" << _type << "] process :[" + << _process << "]\n"; } }; } // namespace Internal diff --git a/include/exiv2/tags.hpp b/include/exiv2/tags.hpp index 1eae8b0abd..0950ed7230 100644 --- a/include/exiv2/tags.hpp +++ b/include/exiv2/tags.hpp @@ -231,7 +231,7 @@ struct EXIV2API TagInfo { TypeId typeId_; //!< Type id int16_t count_; //!< The number of values (not bytes!), 0=any, -1=count not known. PrintFct printFct_; //!< Pointer to tag print function -}; // struct TagInfo +}; //! Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class. class EXIV2API ExifTags { diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index b81f3e4676..3d17adea4c 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -468,7 +468,7 @@ class EXIV2API CommentValue : public StringValueBase { CharsetId charsetId_; //!< Charset id const char* name_; //!< Name of the charset const char* code_; //!< Code of the charset - }; // struct CharsetTable + }; //! Charset information lookup functions. Implemented as a static class. class EXIV2API CharsetInfo { diff --git a/samples/easyaccess-test.cpp b/samples/easyaccess-test.cpp index 59e04f7c2c..5e35e56c54 100644 --- a/samples/easyaccess-test.cpp +++ b/samples/easyaccess-test.cpp @@ -56,7 +56,8 @@ static void printFct(EasyAccessFct fct, Exiv2::ExifData ed, const char* label) { std::cout << " (" << std::setw(35) << pos->key() << ") : " << pos->print(&ed) << "\n"; } else { std::cout << " (" << std::setw(35) << " " - << ") : \n"; + << ") : " + << "\n"; } } diff --git a/samples/getopt-test.cpp b/samples/getopt-test.cpp index 3601fb7152..ae859dc600 100644 --- a/samples/getopt-test.cpp +++ b/samples/getopt-test.cpp @@ -50,22 +50,19 @@ class Params : public Util::Getopt { */ int getopt(int argc, char** const argv) { int rc = Util::Getopt::getopt(argc, argv, ::optstring); - std::cout << "Params::getopt()" - << " rc = " << rc << '\n'; + std::cout << "Params::getopt() rc = " << rc << '\n'; return rc; } //! Handle options and their arguments. int option(int opt, const std::string& optarg, int optopt) override { - std::cout << "Params::option()" - << " opt = " << opt << " optarg = " << optarg << " optopt = " << optopt << '\n'; + std::cout << "Params::option() opt = " << opt << " optarg = " << optarg << " optopt = " << optopt << '\n'; return 0; } //! Handle non-option parameters. int nonoption(const std::string& argv) override { - std::cout << "Params::nonoption()" - << " " << argv << '\n'; + std::cout << "Params::nonoption() " << argv << '\n'; return 0; } }; // class Params diff --git a/samples/ini-test.cpp b/samples/ini-test.cpp index 67a0f5ebf9..3d39d41fcc 100644 --- a/samples/ini-test.cpp +++ b/samples/ini-test.cpp @@ -24,8 +24,7 @@ int main() { std::cerr << "Can't load '" << ini << "'" << '\n'; return EXIT_FAILURE; } - std::cout << "Config loaded from : '" << ini << "' " - << "version=" << reader.GetInteger("protocol", "version", -1) + std::cout << "Config loaded from : '" << ini << "' version=" << reader.GetInteger("protocol", "version", -1) << ", name=" << reader.Get("user", "name", "UNKNOWN") << ", email=" << reader.Get("user", "email", "UNKNOWN") << ", pi=" << reader.GetReal("user", "pi", -1) << ", active=" << reader.GetBoolean("user", "active", true) << '\n'; diff --git a/samples/prevtest.cpp b/samples/prevtest.cpp index d902d79563..1804065e1a 100644 --- a/samples/prevtest.cpp +++ b/samples/prevtest.cpp @@ -21,8 +21,7 @@ int main(int argc, char* const argv[]) try { Exiv2::PreviewManager loader(*image); for (const auto& pos : loader.getPreviewProperties()) { std::cout << pos.mimeType_ << " preview, type " << pos.id_ << ", " << pos.size_ << " bytes, " << pos.width_ << 'x' - << pos.height_ << " pixels" - << "\n"; + << pos.height_ << " pixels\n"; Exiv2::PreviewImage preview = loader.getPreviewImage(pos); auto s = preview.writeFile(filename + "_" + std::to_string(pos.width_) + "x" + std::to_string(pos.height_)); diff --git a/src/basicio.cpp b/src/basicio.cpp index ece4d83f24..bc2997cc30 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -1482,10 +1482,7 @@ void HttpIo::HttpImpl::writeRemote(const byte* data, size_t size, size_t from, s const std::string urlencodeData = urlencode(encodeData.data()); std::stringstream ss; - ss << "path=" << hostInfo_.Path << "&" - << "from=" << from << "&" - << "to=" << to << "&" - << "data=" << urlencodeData; + ss << "path=" << hostInfo_.Path << "&from=" << from << "&to=" << to << "&data=" << urlencodeData; std::string postData = ss.str(); // create the header @@ -1664,10 +1661,7 @@ void CurlIo::CurlImpl::writeRemote(const byte* data, size_t size, size_t from, s // url encode const std::string urlencodeData = urlencode(encodeData.data()); std::stringstream ss; - ss << "path=" << hostInfo.Path << "&" - << "from=" << from << "&" - << "to=" << to << "&" - << "data=" << urlencodeData; + ss << "path=" << hostInfo.Path << "&from=" << from << "&to=" << to << "&data=" << urlencodeData; std::string postData = ss.str(); curl_easy_setopt(curl_, CURLOPT_POSTFIELDS, postData.c_str()); diff --git a/src/bmffimage.cpp b/src/bmffimage.cpp index 5888a11123..a945b12cce 100644 --- a/src/bmffimage.cpp +++ b/src/bmffimage.cpp @@ -93,8 +93,8 @@ std::string BmffImage::toAscii(uint32_t n) { // show 0 as _ std::replace(result.begin(), result.end(), '\0', '_'); // show non 7-bit printable ascii as . - std::replace_if( - result.begin(), result.end(), [](char c) { return c < 32 || c > 126; }, '.'); + auto f = [](char c) { return c < 32 || c > 126; }; + std::replace_if(result.begin(), result.end(), f, '.'); return result; } diff --git a/src/convert.cpp b/src/convert.cpp index 626933990d..26749f9393 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -1051,8 +1051,7 @@ void Converter::cnvXmpFlash(const char* from, const char* to) { value |= fired & 1; #ifndef SUPPRESS_WARNINGS else - EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Fired" - << " to " << to << "\n"; + EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Fired to " << to << '\n'; #endif } pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Return")); @@ -1062,8 +1061,7 @@ void Converter::cnvXmpFlash(const char* from, const char* to) { value |= (ret & 3) << 1; #ifndef SUPPRESS_WARNINGS else - EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Return" - << " to " << to << "\n"; + EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Return to " << to << '\n'; #endif } pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Mode")); @@ -1073,8 +1071,7 @@ void Converter::cnvXmpFlash(const char* from, const char* to) { value |= (mode & 3) << 3; #ifndef SUPPRESS_WARNINGS else - EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Mode" - << " to " << to << "\n"; + EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Mode to " << to << '\n'; #endif } pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Function")); @@ -1084,8 +1081,7 @@ void Converter::cnvXmpFlash(const char* from, const char* to) { value |= (function & 1) << 5; #ifndef SUPPRESS_WARNINGS else - EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Function" - << " to " << to << "\n"; + EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:Function to " << to << '\n'; #endif } pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:RedEyeMode")); @@ -1096,8 +1092,7 @@ void Converter::cnvXmpFlash(const char* from, const char* to) { value |= (red & 1) << 6; #ifndef SUPPRESS_WARNINGS else - EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:RedEyeMode" - << " to " << to << "\n"; + EXV_WARNING << "Failed to convert " << std::string(from) + "/exif:RedEyeMode to " << to << '\n'; #endif } if (erase_) diff --git a/src/fff.h b/src/fff.h index 25987ba298..989cdf3143 100644 --- a/src/fff.h +++ b/src/fff.h @@ -156,7 +156,8 @@ be considered as real pixels */ unsigned char stripeFields; //!< Number of striped fields this image consists of unsigned char reserved; //!< For future use - should be set to 0 unsigned short reserved1; //!< For future use - should be set to 0 -} GEOMETRIC_INFO_T; //!< sizeof struct == 32 bytes + +} GEOMETRIC_INFO_T; //!< sizeof struct == 32 bytes struct IMAGEINFO_T { unsigned long imageTime; //!< Time in seconds since 1970-01-01 00:00 (UTC) @@ -233,6 +234,7 @@ struct DISTR_DATA_T { short reserved; //!< For future use long reserved2[3]; + }; //!< sizeof struct == 64 bytes typedef struct _pres_par_t { @@ -240,6 +242,7 @@ typedef struct _pres_par_t { span (in pixel units) */ signed long span; /* Span as normalized pixel value (apix) */ BYTE reserved[40]; + } PRES_PAR_T; /* sizeof struct == 48 bytes */ /** @@ -282,7 +285,8 @@ struct OBJECT_PAR_T { float relHum; //!< relative humidity long reserved[4]; //!< For future use - should be set to 0 -}; //!< sizeof struct == 48 bytes + +}; //!< sizeof struct == 48 bytes struct TEMP_CALIB_T { long Reserved1[2]; @@ -344,7 +348,8 @@ struct TEMPSENSOR_DATA_T { char pzTSName[SYSIMG_NAMELEN + 1]; ULONG captureTime; //!< TS updated; time in seconds since 1970-01-01 00:00 ULONG captureMilliTime; //!< TS updated; Milliseconds since last second -}; //!< sizeof struct == 28 bytes + +}; //!< sizeof struct == 28 bytes /** Detector parameter struct */ struct DETECTOR_PARAM_T { @@ -360,7 +365,8 @@ struct EXTENDED_IMAGEINFO_T { DETECTOR_PARAM_T detectorPars[20]; //!< Currently used detector parameters like //! used bias, offsets. Usage is camera //! dependent -}; //!< sizeof struct == 960 bytes + +}; //!< sizeof struct == 960 bytes struct _bidata_t { GEOMETRIC_INFO_T GeometricInfo; // 32 bytes diff --git a/src/jp2image.cpp b/src/jp2image.cpp index 9485a28643..8911817063 100644 --- a/src/jp2image.cpp +++ b/src/jp2image.cpp @@ -191,13 +191,12 @@ void Jp2Image::readMetadata() { throw Error(ErrorCode::kerCorruptedMetadata); } #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "Exiv2::Jp2Image::readMetadata: " - << "subBox = " << toAscii(subBox.type) << " length = " << subBox.length << '\n'; + std::cout << "Exiv2::Jp2Image::readMetadata: subBox = " << toAscii(subBox.type) + << " length = " << subBox.length << '\n'; #endif if (subBox.type == kJp2BoxTypeColorSpec && subBox.length != 15) { #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "Exiv2::Jp2Image::readMetadata: " - << "Color data found" << '\n'; + std::cout << "Exiv2::Jp2Image::readMetadata: Color data found\n"; #endif const size_t pad = 3; // 3 padding bytes 2 0 0 diff --git a/src/photoshop.cpp b/src/photoshop.cpp index f05f3682e5..f87a13eae0 100644 --- a/src/photoshop.cpp +++ b/src/photoshop.cpp @@ -57,8 +57,7 @@ int Photoshop::locateIrb(const byte* pPsData, size_t sizePsData, uint16_t psTag, position += psSize; if (position + 4 > sizePsData) { #ifdef EXIV2_DEBUG_MESSAGES - std::cerr << "Warning: " - << "Invalid or extended Photoshop IRB\n"; + std::cerr << "Warning: Invalid or extended Photoshop IRB\n"; #endif return -2; } @@ -66,15 +65,13 @@ int Photoshop::locateIrb(const byte* pPsData, size_t sizePsData, uint16_t psTag, position += 4; if (dataSize > (sizePsData - position)) { #ifdef EXIV2_DEBUG_MESSAGES - std::cerr << "Warning: " - << "Invalid Photoshop IRB data size " << dataSize << " or extended Photoshop IRB\n"; + std::cerr << "Warning: Invalid Photoshop IRB data size " << dataSize << " or extended Photoshop IRB\n"; #endif return -2; } #ifdef EXIV2_DEBUG_MESSAGES if ((dataSize & 1) && position + dataSize == sizePsData) { - std::cerr << "Warning: " - << "Photoshop IRB data is not padded to even size\n"; + std::cerr << "Warning: Photoshop IRB data is not padded to even size\n"; } #endif if (type == psTag) { @@ -94,8 +91,7 @@ int Photoshop::locateIrb(const byte* pPsData, size_t sizePsData, uint16_t psTag, #endif if (position < sizePsData) { #ifdef EXIV2_DEBUG_MESSAGES - std::cerr << "Warning: " - << "Invalid or extended Photoshop IRB\n"; + std::cerr << "Warning: Invalid or extended Photoshop IRB\n"; #endif return -2; } diff --git a/src/pngchunk_int.cpp b/src/pngchunk_int.cpp index 1b38829bc2..377ec39b70 100644 --- a/src/pngchunk_int.cpp +++ b/src/pngchunk_int.cpp @@ -290,8 +290,7 @@ void PngChunk::parseChunkContent(Image* pImage, const byte* key, size_t keySize, xmpPacket.assign(arr.c_str(), arr.size()); if (auto idx = xmpPacket.find_first_of('<'); idx != std::string::npos && idx > 0) { #ifndef SUPPRESS_WARNINGS - EXV_WARNING << "Removing " << idx << " characters " - << "from the beginning of the XMP packet\n"; + EXV_WARNING << "Removing " << idx << " characters from the beginning of the XMP packet\n"; #endif xmpPacket = xmpPacket.substr(idx); } diff --git a/src/pngimage.cpp b/src/pngimage.cpp index cf936b0739..a2289ccb96 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -588,8 +588,7 @@ void PngImage::doWriteMetadata(BasicIo& outIo) { throw Error(ErrorCode::kerImageWriteFailed); } #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "Exiv2::PngImage::doWriteMetadata: build eXIf" - << " chunk (length: " << blob.size() << ")" << '\n'; + std::cout << "Exiv2::PngImage::doWriteMetadata: build eXIf chunk (length: " << blob.size() << ")\n"; #endif } } @@ -631,8 +630,7 @@ void PngImage::doWriteMetadata(BasicIo& outIo) { throw Error(ErrorCode::kerImageWriteFailed); } #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "Exiv2::PngImage::doWriteMetadata: build iCCP" - << " chunk (length: " << chunkLength << ")" << '\n'; + std::cout << "Exiv2::PngImage::doWriteMetadata: build iCCP chunk (length: " << chunkLength << ")\n"; #endif } } diff --git a/src/tiffvisitor_int.cpp b/src/tiffvisitor_int.cpp index c7cc4980da..f1544d3684 100644 --- a/src/tiffvisitor_int.cpp +++ b/src/tiffvisitor_int.cpp @@ -304,9 +304,7 @@ void TiffDecoder::decodeIptc(const TiffEntryBase* object) { return; } #ifndef SUPPRESS_WARNINGS - EXV_WARNING << "Failed to decode IPTC block found in " - << "Directory Image, entry 0x83bb\n"; - + EXV_WARNING << "Failed to decode IPTC block found in Directory Image, entry 0x83bb\n"; #endif } @@ -326,9 +324,7 @@ void TiffDecoder::decodeIptc(const TiffEntryBase* object) { return; } #ifndef SUPPRESS_WARNINGS - EXV_WARNING << "Failed to decode IPTC block found in " - << "Directory Image, entry 0x8649\n"; - + EXV_WARNING << "Failed to decode IPTC block found in Directory Image, entry 0x8649\n"; #endif } } // TiffMetadataDecoder::decodeIptc @@ -1235,8 +1231,7 @@ void TiffReader::readTiffEntry(TiffEntryBase* object) { if (p + 12 > pLast_) { #ifndef SUPPRESS_WARNINGS EXV_ERROR << "Entry in directory " << groupName(object->group()) - << "requests access to memory beyond the data buffer. " - << "Skipping entry.\n"; + << "requests access to memory beyond the data buffer. Skipping entry.\n"; #endif return; }