From 697c17279cc0d09b6796f668c47be506d9ae4f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 25 Jan 2019 19:48:47 +0100 Subject: [PATCH] Backwards compatibility for std::unique_ptr where needed. --- doc/changelog.dox | 9 +++++++++ src/Magnum/Text/AbstractFont.h | 4 ++++ src/Magnum/Text/AbstractFontConverter.h | 4 ++++ src/Magnum/Trade/AbstractImporter.h | 4 ++++ 4 files changed, 21 insertions(+) diff --git a/doc/changelog.dox b/doc/changelog.dox index c4e5148db..de2c2276a 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -189,6 +189,15 @@ See also: @subsection changelog-latest-deprecated Deprecated APIs +- All uses of @ref std::unique_ptr in @ref Text::AbstractFont, + @ref Text::AbstractFontConverter and @ref Trade::AbstractImporter are + replaced with @ref Corrade::Containers::Pointer. The types are implicitly + move-convertible to each other if the + @ref Corrade/Containers/PointerStl.h header is included. The header is + included where needed if @ref MAGNUM_BUILD_DEPRECATED is enabled. To ensure + your code keeps with future versions of Magnum, either switch your + code to use @ref Corrade::Containers::Pointer as well or include the + @ref Corrade/Containers/PointerStl.h header explicitly. - @cpp TextureTools::distanceField() @ce is deprecated due to inefficiency of its statelessness when doing batch processing. Use the @ref TextureTools::DistanceField class instead. diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index 1c88339bc..c562a5dff 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -39,6 +39,10 @@ #include "Magnum/Text/Text.h" #include "Magnum/Text/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Text { /** diff --git a/src/Magnum/Text/AbstractFontConverter.h b/src/Magnum/Text/AbstractFontConverter.h index f86515fc6..bd7e00580 100644 --- a/src/Magnum/Text/AbstractFontConverter.h +++ b/src/Magnum/Text/AbstractFontConverter.h @@ -37,6 +37,10 @@ #include "Magnum/Text/Text.h" #include "Magnum/Text/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Text { /** diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index b0ce69565..813bae8a5 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -36,6 +36,10 @@ #include "Magnum/Trade/Trade.h" #include "Magnum/Trade/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Trade { /**