Skip to content
  • Stefan Brüns's avatar
    Use forward declaration for Exiv2::Image, port to std::unique_ptr · 61543b42
    Stefan Brüns authored
    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
    61543b42