From 9e2843c0993c9c7f9cd7978da45f55429d972b6f Mon Sep 17 00:00:00 2001 From: ptahmose Date: Sun, 11 Feb 2024 13:57:02 +0100 Subject: [PATCH] cosmetic --- Src/libCZI/CziReaderCommon.cpp | 22 +++++++++++----------- Src/libCZI/CziReaderWriter.cpp | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Src/libCZI/CziReaderCommon.cpp b/Src/libCZI/CziReaderCommon.cpp index 64683e0c..cff8ea1d 100644 --- a/Src/libCZI/CziReaderCommon.cpp +++ b/Src/libCZI/CziReaderCommon.cpp @@ -45,7 +45,7 @@ using namespace libCZI; libCZI::SubBlockInfo& info) { bool foundASubBlock = false; - SubBlockStatistics s = repository->GetStatistics();// this->subBlkDir.GetStatistics(); + SubBlockStatistics s = repository->GetStatistics(); if (!s.dimBounds.IsValid(DimensionIndex::C)) { // in this case -> just take the first subblock... @@ -88,19 +88,19 @@ using namespace libCZI; func( [&](int index, const CCziAttachmentsDirectoryBase::AttachmentEntry& ae) { - if (contentFileType == nullptr || strcmp(contentFileType, ae.ContentFileType) == 0) - { - if (name == nullptr || strcmp(name, ae.Name) == 0) + if (contentFileType == nullptr || strcmp(contentFileType, ae.ContentFileType) == 0) { - ai.contentGuid = ae.ContentGuid; - memcpy(ai.contentFileType, ae.ContentFileType, sizeof(ae.ContentFileType)); - ai.name = ae.Name; - bool b = funcEnum(index, ai); - return b; + if (name == nullptr || strcmp(name, ae.Name) == 0) + { + ai.contentGuid = ae.ContentGuid; + memcpy(ai.contentFileType, ae.ContentFileType, sizeof(ae.ContentFileType)); + ai.name = ae.Name; + bool b = funcEnum(index, ai); + return b; + } } - } - return true; + return true; }); } diff --git a/Src/libCZI/CziReaderWriter.cpp b/Src/libCZI/CziReaderWriter.cpp index 435ee737..df41d723 100644 --- a/Src/libCZI/CziReaderWriter.cpp +++ b/Src/libCZI/CziReaderWriter.cpp @@ -730,7 +730,6 @@ void CCziReaderWriter::WriteToOutputStream(std::uint64_t offset, const void* pv, /*virtual*/void CCziReaderWriter::EnumerateSubset(const char* contentFileType, const char* name, const std::function& funcEnum) { this->ThrowIfNotOperational(); - //throw std::runtime_error("Not Implemented"); CziReaderCommon::EnumerateSubset( std::bind(&CReaderWriterCziAttachmentsDirectory::EnumEntries, &this->attachmentDirectory, std::placeholders::_1), contentFileType,