Use forward declaration for Exiv2::Image, port to std::unique_ptr

Authored by bruns on Dec 30 2018, 1:46 AM.

Description

Use forward declaration for Exiv2::Image, port to std::unique_ptr

Summary:
Instead of the Exiv2::Image::AutoPtr typedef just use a forward declaration
for Exiv2::Image, and use std::unique_ptr instead of std::auto_ptr.

The forward declaration avoids pulling in Exiv2 declarations everywhere,
e.g. via document.h.

Although it would be possible to use std::auto_ptr, unique_ptr is
preferable for two reasons:

  • ownership transfer is explicit (std::move, release()/reset())
  • Exiv2 0.28 will use std::unique_ptr as well, i.e. the code is forward

compatible.

Reviewers: Gwenview, cfeck, ngraham

Reviewed By: Gwenview, ngraham

Subscribers: lbeltrame, ngraham, asturmlechner, shubham

Tags: Gwenview

Differential Revision: https://phabricator.kde.org/D17872

Details

Committed
brunsJan 1 2019, 11:50 PM
Reviewer
Gwenview
Differential Revision
D17872: Use forward declaration for Exiv2::Image, port to std::unique_ptr
Parents
R260:a420ba69d864: Use FlowLayout for Crop toolbar
Branches
Unknown
Tags
Unknown