eps: Fix code after usage of unique_ptr. Remove deprecation tags

main
Luis Díaz Más 4 years ago
parent e8181a2bec
commit d5240a4bda

@ -56,7 +56,7 @@ namespace Exiv2
/*!
@brief Class to access EPS images.
*/
class EXIV2LIB_DEPRECATED_EXPORT EpsImage : public Image {
class EXIV2API EpsImage : public Image {
public:
//! @name Creators
//@{
@ -74,7 +74,7 @@ namespace Exiv2
@param create Specifies if an existing image should be read (false)
or if a new file should be created (true).
*/
EpsImage(BasicIo::AutoPtr io, bool create);
EpsImage(BasicIo::UniquePtr io, bool create);
//@}
//! @name Manipulators
@ -114,10 +114,10 @@ namespace Exiv2
Caller owns the returned object and the auto-pointer ensures that
it will be deleted.
*/
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create);
EXIV2API Image::UniquePtr newEpsInstance(BasicIo::UniquePtr io, bool create);
//! Check if the file iIo is a EPS image.
EXIV2LIB_DEPRECATED_EXPORT bool isEpsType(BasicIo& iIo, bool advance);
EXIV2API bool isEpsType(BasicIo& iIo, bool advance);
} // namespace Exiv2

@ -805,7 +805,7 @@ namespace {
}
// create temporary output file
BasicIo::AutoPtr tempIo(new MemIo);
BasicIo::UniquePtr tempIo(new MemIo);
assert (tempIo.get() != 0);
if (!tempIo->isopen()) {
#ifndef SUPPRESS_WARNINGS
@ -1075,8 +1075,8 @@ namespace {
namespace Exiv2
{
EpsImage::EpsImage(BasicIo::AutoPtr io, bool create)
: Image(ImageType::eps, mdXmp, io)
EpsImage::EpsImage(BasicIo::UniquePtr io, bool create)
: Image(ImageType::eps, mdXmp, std::move(io))
{
//LogMsg::setLevel(LogMsg::debug);
if (create) {
@ -1151,9 +1151,9 @@ namespace Exiv2
// *************************************************************************
// free functions
Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create)
Image::UniquePtr newEpsInstance(BasicIo::UniquePtr io, bool create)
{
Image::AutoPtr image(new EpsImage(io, create));
Image::UniquePtr image(new EpsImage(std::move(io), create));
if (!image->good()) {
image.reset();
}

Loading…
Cancel
Save