Skip to content

Commit

Permalink
Replace TiffTreeStruct with std::pair
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Aug 4, 2022
1 parent 4f1602b commit 48070a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/tiffimage_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1968,8 +1968,8 @@ void TiffCreator::getPath(TiffPath& tiffPath, uint32_t extendedTag, IfdId group,
tiffPath.push(TiffPathItem(extendedTag, group));
const auto ts = tiffTreeTable_.find(TiffGroupKey(root, group));
assert(ts != tiffTreeTable_.end());
extendedTag = ts->second.parentExtTag_;
group = ts->second.parentGroup_;
extendedTag = ts->second.second;
group = ts->second.first;
if (ts->first == TiffGroupKey(root, IfdId::ifdIdNotSet)) {
break;
}
Expand Down
8 changes: 2 additions & 6 deletions src/tiffimage_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,8 @@ using TiffGroupTable = std::unordered_map<TiffGroupKey, NewTiffCompFct, TiffGrou
Multiple trees are needed as TIFF-based RAW image formats do not always
use standard TIFF layout.
*/
struct TiffTreeStruct {
IfdId parentGroup_; //!< Parent group
uint32_t parentExtTag_; //!< Parent tag (32 bit so that it can contain special tags)
};

using TiffTreeTable = std::unordered_map<TiffGroupKey, TiffTreeStruct, TiffGroupKey_hash>;
using TiffTreeParent = std::pair<IfdId, uint32_t>; // Parent group, parent tag
using TiffTreeTable = std::unordered_map<TiffGroupKey, TiffTreeParent, TiffGroupKey_hash>;

/*!
@brief TIFF component factory.
Expand Down

0 comments on commit 48070a2

Please sign in to comment.