Browse Source

doc: suggest StaticArray as another replacement for the deprecated Array.

pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
3ebbd2ed39
  1. 5
      doc/changelog.dox
  2. 15
      src/Magnum/Array.h
  3. 6
      src/Magnum/Magnum.h

5
doc/changelog.dox

@ -444,7 +444,10 @@ See also:
It was also commonly confused with @relativeref{Corrade,Containers::Array},
which is a type with totally different semantics. To avoid breaking
existing code, conversion from and to @ref Math::Vector is now provided and
this type is included in all places where it was originally used.
this type is included in all places where it was originally used. For
custom uses, the @relativeref{Corrade,Containers::Array1}, @relativeref{Corrade,Containers::Array2} or
@relativeref{Corrade,Containers::Array3} types provide a suitable
alternative as well.
- Markup styling for Emscripten application was switched to prefer using
CSS classes instead of the @cb{.css} #container @ce, @cb{.css} #sizer @ce,
@cb{.css} #expander @ce, @cb{.css} #listener @ce, @cb{.css} #canvas @ce,

15
src/Magnum/Array.h

@ -141,9 +141,10 @@ CORRADE_IGNORE_DEPRECATED_PUSH
/**
@brief One-dimensional array
@tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector instead.
@m_deprecated_since_latest Use @ref Math::Vector or @ref Containers::Array1
instead.
*/
template<class T> class CORRADE_DEPRECATED("use Math::Vector instead") Array1D: public Array<1, T> {
template<class T> class CORRADE_DEPRECATED("use Math::Vector or Containers::Array1 instead") Array1D: public Array<1, T> {
public:
/** @copydoc Array::Array() */
constexpr /*implicit*/ Array1D() = default;
@ -164,9 +165,10 @@ template<class T> class CORRADE_DEPRECATED("use Math::Vector instead") Array1D:
/**
@brief Two-dimensional array
@tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector2 instead.
@m_deprecated_since_latest Use @ref Math::Vector2 or @ref Containers::Array2
instead.
*/
template<class T> class CORRADE_DEPRECATED("use Math::Vector2 instead") Array2D: public Array<2, T> {
template<class T> class CORRADE_DEPRECATED("use Math::Vector2 or Containers::Array2 instead") Array2D: public Array<2, T> {
public:
/** @copydoc Array::Array() */
constexpr /*implicit*/ Array2D() = default;
@ -198,9 +200,10 @@ template<class T> class CORRADE_DEPRECATED("use Math::Vector2 instead") Array2D
/**
@brief Three-dimensional array
@tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector3 instead.
@m_deprecated_since_latest Use @ref Math::Vector3 or @ref Containers::Array3
instead.
*/
template<class T> class CORRADE_DEPRECATED("use Math::Vector3 instead") Array3D: public Array<3, T> {
template<class T> class CORRADE_DEPRECATED("use Math::Vector3 or Containers::Array3 instead") Array3D: public Array<3, T> {
public:
/** @copydoc Array::Array() */
constexpr /*implicit*/ Array3D() {}

6
src/Magnum/Magnum.h

@ -1171,9 +1171,9 @@ typedef Math::Frustum<Double> Frustumd;
#ifndef DOXYGEN_GENERATING_OUTPUT
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt, class T> class CORRADE_DEPRECATED("use Math::Vector instead") Array;
template<class T> class CORRADE_DEPRECATED("use Math::Vector instead") Array1D;
template<class T> class CORRADE_DEPRECATED("use Math::Vector2 instead") Array2D;
template<class T> class CORRADE_DEPRECATED("use Math::Vector3 instead") Array3D;
template<class T> class CORRADE_DEPRECATED("use Math::Vector or Containers::Array1 instead") Array1D;
template<class T> class CORRADE_DEPRECATED("use Math::Vector2 or Containers::Array2 instead") Array2D;
template<class T> class CORRADE_DEPRECATED("use Math::Vector3 or Containers::Array3 instead") Array3D;
#endif
enum class InputFileCallbackPolicy: UnsignedByte;

Loading…
Cancel
Save