Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
ptahmose committed Feb 11, 2024
1 parent 3b7c66f commit 9e2843c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Src/libCZI/CziReaderCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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;
});
}

Expand Down
1 change: 0 additions & 1 deletion Src/libCZI/CziReaderWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool(int index, const libCZI::AttachmentInfo& infi)>& funcEnum)
{
this->ThrowIfNotOperational();
//throw std::runtime_error("Not Implemented");
CziReaderCommon::EnumerateSubset(
std::bind(&CReaderWriterCziAttachmentsDirectory::EnumEntries, &this->attachmentDirectory, std::placeholders::_1),
contentFileType,
Expand Down

0 comments on commit 9e2843c

Please sign in to comment.