Replace TiffTreeStruct with std::pair

This commit is contained in:
Kevin Backhouse 2022-08-03 22:17:01 -04:00 committed by Rosen Penev
parent 3d38e11300
commit 166b5b834d
2 changed files with 4 additions and 8 deletions

View File

@ -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;
}

View File

@ -152,12 +152,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.