diff --git a/src/Magnum/AbstractTexture.h b/src/Magnum/AbstractTexture.h index 8a828dc68..688a5aea7 100644 --- a/src/Magnum/AbstractTexture.h +++ b/src/Magnum/AbstractTexture.h @@ -35,6 +35,10 @@ #include "Magnum/DimensionTraits.h" #include "Magnum/Sampler.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Implementation { diff --git a/src/Magnum/Buffer.h b/src/Magnum/Buffer.h index 005ccfa4a..cba405540 100644 --- a/src/Magnum/Buffer.h +++ b/src/Magnum/Buffer.h @@ -39,6 +39,10 @@ #include "Magnum/AbstractObject.h" #include "Magnum/Magnum.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /** diff --git a/src/Magnum/DebugOutput.h b/src/Magnum/DebugOutput.h index 4f1a9a711..2b34c2f64 100644 --- a/src/Magnum/DebugOutput.h +++ b/src/Magnum/DebugOutput.h @@ -36,6 +36,10 @@ #include "Magnum/OpenGL.h" #include "Magnum/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Implementation { struct DebugState; } diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index 2755acf93..af6f1ba50 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -34,10 +34,6 @@ #include "Magnum/Types.h" #include "Magnum/Math/Math.h" -#ifdef MAGNUM_BUILD_DEPRECATED -#include -#endif - #ifndef DOXYGEN_GENERATING_OUTPUT typedef unsigned int GLenum; /* Needed for *Format and *Type enums */ #endif @@ -303,20 +299,6 @@ typedef Math::Range2D Range2Di; /** @brief Signed integer 3D range */ typedef Math::Range3D Range3Di; -#ifdef MAGNUM_BUILD_DEPRECATED -/** -@copybrief Range2D -@deprecated Use @ref Magnum::Range2D "Range2D" instead. -*/ -typedef CORRADE_DEPRECATED("use Range2D instead") Math::Geometry::Rectangle Rectangle; - -/** -@copybrief Range2Di -@deprecated Use @ref Magnum::Range2Di "Range2Di" instead. -*/ -typedef CORRADE_DEPRECATED("use Range2Di instead") Math::Geometry::Rectangle Rectanglei; -#endif - /*@}*/ #ifndef MAGNUM_TARGET_GLES @@ -419,14 +401,6 @@ typedef Math::Range2D Range2Dd; /** @brief Double 3D range */ typedef Math::Range3D Range3Dd; -#ifdef MAGNUM_BUILD_DEPRECATED -/** -@copybrief Range2Dd -@deprecated Use @ref Magnum::Range2Dd instead. -*/ -typedef CORRADE_DEPRECATED("use Range2Dd instead") Math::Geometry::Rectangle Rectangled; -#endif - /*@}*/ #endif diff --git a/src/Magnum/Math/Geometry/CMakeLists.txt b/src/Magnum/Math/Geometry/CMakeLists.txt index 6d091d983..48f1d49c7 100644 --- a/src/Magnum/Math/Geometry/CMakeLists.txt +++ b/src/Magnum/Math/Geometry/CMakeLists.txt @@ -27,12 +27,6 @@ set(MagnumMathGeometry_HEADERS Distance.h Intersection.h) -# Deprecated headers -if(BUILD_DEPRECATED) - set(MagnumMathGeometry_HEADERS ${MagnumMathGeometry_HEADERS} - Rectangle.h) -endif() - # Force IDEs to display all header files in project view add_custom_target(MagnumMathGeometry SOURCES ${MagnumMathGeometry_HEADERS}) diff --git a/src/Magnum/Math/Geometry/Rectangle.h b/src/Magnum/Math/Geometry/Rectangle.h deleted file mode 100644 index ffedcbb30..000000000 --- a/src/Magnum/Math/Geometry/Rectangle.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef Magnum_Math_Geometry_Rectangle_h -#define Magnum_Math_Geometry_Rectangle_h -/* - This file is part of Magnum. - - Copyright © 2010, 2011, 2012, 2013, 2014, 2015 - Vladimír Vondruš - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. -*/ - -/** @file - * @brief Class @ref Magnum::Math::Geometry::Rectangle - * @deprecated Use @ref Magnum/Math/Range.h instead. - */ - -#include "Magnum/Math/Range.h" - -#ifdef MAGNUM_BUILD_DEPRECATED -#include - -namespace Magnum { namespace Math { namespace Geometry { - -/** -@copybrief Math::Range2D -@deprecated Use @ref Magnum::Math::Range2D "Math::Range2D" instead. -*/ -template class CORRADE_DEPRECATED("use Math::Range2D instead") Rectangle: public Range2D { - public: - /** @copydoc Range2D() */ - constexpr Rectangle() = default; - - /** @copydoc Range2D(const Vector2&, const Vector2&) */ - constexpr Rectangle(const Vector2& min, const Vector2& max): Range2D(min, max) {} - - /** @copydoc Range2D(const Range<2, T>&) */ - constexpr Rectangle(const Range<2, T>& other): Range2D(other) {} - - /** @copydoc Range2D(const Range2D&) */ - template constexpr explicit Rectangle(const Range2D& other): Range2D(other) {} - - /** @copydoc Range2D::sizeX() */ - T width() const { return Range2D::sizeX(); } - - /** @copydoc Range2D::sizeY() */ - T height() const { return Range2D::sizeY(); } -}; - -}}} - -namespace Corrade { namespace Utility { - /** @configurationvalue{Magnum::Math::Geometry::Rectangle} */ - template struct ConfigurationValue>: public ConfigurationValue> {}; -}} -#else -#error use Magnum/Math/Range.h instead -#endif - -#endif diff --git a/src/Magnum/Math/Math.h b/src/Magnum/Math/Math.h index 4aadca50d..0827c2ce9 100644 --- a/src/Magnum/Math/Math.h +++ b/src/Magnum/Math/Math.h @@ -77,12 +77,6 @@ template class Range; template using Range1D = Range<1, T>; template class Range2D; template class Range3D; - -#ifdef MAGNUM_BUILD_DEPRECATED -namespace Geometry { - template class Rectangle; -} -#endif #endif }} diff --git a/src/Magnum/Math/Test/RangeTest.cpp b/src/Magnum/Math/Test/RangeTest.cpp index fd5d1c357..dd687ed9a 100644 --- a/src/Magnum/Math/Test/RangeTest.cpp +++ b/src/Magnum/Math/Test/RangeTest.cpp @@ -29,10 +29,6 @@ #include "Magnum/Math/Range.h" -#ifdef MAGNUM_BUILD_DEPRECATED -#include "Magnum/Math/Geometry/Rectangle.h" -#endif - namespace Magnum { namespace Math { namespace Test { struct RangeTest: Corrade::TestSuite::Tester { @@ -56,10 +52,6 @@ struct RangeTest: Corrade::TestSuite::Tester { void subclassTypes(); void subclass(); - #ifdef MAGNUM_BUILD_DEPRECATED - void deprecated(); - #endif - void debug(); void configuration(); }; @@ -92,10 +84,6 @@ RangeTest::RangeTest() { &RangeTest::subclassTypes, &RangeTest::subclass, - #ifdef MAGNUM_BUILD_DEPRECATED - &RangeTest::deprecated, - #endif - &RangeTest::debug, &RangeTest::configuration}); } @@ -338,32 +326,6 @@ void RangeTest::debug() { CORRADE_COMPARE(o.str(), "Range({34, 23}, {47, 30})\n"); } -#ifdef MAGNUM_BUILD_DEPRECATED -void RangeTest::deprecated() { - typedef Geometry::Rectangle Rectangle; - typedef Geometry::Rectangle Rectanglei; - - Rectanglei a({45, 23}, {-17, 35}); - CORRADE_COMPARE(Rectanglei(), Range2Di({0, 0}, {0, 0})); - CORRADE_COMPARE(a, Range2Di({45, 23}, {-17, 35})); - CORRADE_COMPARE(Rectanglei(a), Range2Di({45, 23}, {-17, 35})); - CORRADE_COMPARE(Rectangle(a), Range2D({45.0f, 23.0f}, {-17.0f, 35.0f})); - - CORRADE_COMPARE(a.width(), -62); - CORRADE_COMPARE(a.height(), 12); - - CORRADE_VERIFY(!(std::is_convertible::value)); - - Corrade::Utility::Configuration c; - Rectangle rect({3.0f, 3.125f}, {9.0f, 9.55f}); - std::string value("3 3.125 9 9.55"); - - c.setValue("rectangle", rect); - CORRADE_COMPARE(c.value("rectangle"), value); - CORRADE_COMPARE(c.value("rectangle"), rect); -} -#endif - void RangeTest::configuration() { Corrade::Utility::Configuration c; diff --git a/src/Magnum/Mesh.h b/src/Magnum/Mesh.h index 31ec20c04..d311a060a 100644 --- a/src/Magnum/Mesh.h +++ b/src/Magnum/Mesh.h @@ -36,6 +36,10 @@ #include "Magnum/AbstractObject.h" #include "Magnum/Attribute.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /** diff --git a/src/Magnum/MeshView.h b/src/Magnum/MeshView.h index 80e4f4568..45b8631e6 100644 --- a/src/Magnum/MeshView.h +++ b/src/Magnum/MeshView.h @@ -36,6 +36,10 @@ #include "Magnum/OpenGL.h" #include "Magnum/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace Implementation { struct MeshState; } diff --git a/src/Magnum/PrimitiveQuery.h b/src/Magnum/PrimitiveQuery.h index 46785bb1e..e47e482aa 100644 --- a/src/Magnum/PrimitiveQuery.h +++ b/src/Magnum/PrimitiveQuery.h @@ -33,6 +33,10 @@ #include "Magnum/AbstractQuery.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + #ifndef MAGNUM_TARGET_GLES2 namespace Magnum { diff --git a/src/Magnum/Resource.h b/src/Magnum/Resource.h index 4374d3143..01654d629 100644 --- a/src/Magnum/Resource.h +++ b/src/Magnum/Resource.h @@ -35,6 +35,10 @@ #include "Magnum/Magnum.h" #include "Magnum/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /** diff --git a/src/Magnum/SampleQuery.h b/src/Magnum/SampleQuery.h index aa0d97b66..47e3eda9b 100644 --- a/src/Magnum/SampleQuery.h +++ b/src/Magnum/SampleQuery.h @@ -31,6 +31,10 @@ #include "Magnum/AbstractQuery.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /** diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 03c70ce12..6c3fa2ead 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -37,6 +37,10 @@ #include "Magnum/SceneGraph/SceneGraph.h" #include "Magnum/SceneGraph/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace SceneGraph { /** diff --git a/src/Magnum/TimeQuery.h b/src/Magnum/TimeQuery.h index af41e0f21..65e68428f 100644 --- a/src/Magnum/TimeQuery.h +++ b/src/Magnum/TimeQuery.h @@ -31,6 +31,10 @@ #include "Magnum/AbstractQuery.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /**