Skip to content
Commit 61543b42 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

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
parent a420ba69
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment