Skip to content

Commit

Permalink
conversions to make_unique
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Mar 7, 2022
1 parent 7ed4303 commit 7f3b696
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/tiffcomposite_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1557,25 +1557,22 @@ namespace Exiv2 {
template<uint16_t dtTag, IfdId dtGroup>
TiffComponent::UniquePtr newTiffThumbSize(uint16_t tag, IfdId group)
{
return TiffComponent::UniquePtr(
new TiffSizeEntry(tag, group, dtTag, dtGroup));
return std::make_unique<TiffSizeEntry>(tag, group, dtTag, dtGroup);
}

//! Function to create and initialize a new TIFF entry for image data
template<uint16_t szTag, IfdId szGroup>
TiffComponent::UniquePtr newTiffImageData(uint16_t tag, IfdId group)
{
return TiffComponent::UniquePtr(
new TiffImageEntry(tag, group, szTag, szGroup));
return std::make_unique<TiffImageEntry>(tag, group, szTag, szGroup);
}

//! Function to create and initialize a new TIFF entry for image data (size)
template<uint16_t dtTag, IfdId dtGroup>
TiffComponent::UniquePtr newTiffImageSize(uint16_t tag, IfdId group)
{
// Todo: Same as newTiffThumbSize - consolidate (rename)?
return TiffComponent::UniquePtr(
new TiffSizeEntry(tag, group, dtTag, dtGroup));
return std::make_unique<TiffSizeEntry>(tag, group, dtTag, dtGroup);
}

}} // namespace Internal, Exiv2
Expand Down

0 comments on commit 7f3b696

Please sign in to comment.