@ -364,15 +364,27 @@ template<UnsignedInt dimensions> class Image {
Containers : : ArrayView < const char > data ( ) const & { return _data ; }
Containers : : ArrayView < const char > data ( ) const & & = delete ; /**< @overload */
/** @overload */
template < class T = char > T * data ( ) {
# ifdef MAGNUM_BUILD_DEPRECATED
/**
* @ brief Image data in a particular type
* @ deprecated Use non - templated @ ref data ( ) together with
* @ ref Corrade : : Containers : : arrayCast ( ) instead for properly
* bounds - checked type conversion .
*/
template < class T > CORRADE_DEPRECATED ( " use data() together with Containers::arrayCast() instead " ) T * data ( ) {
return reinterpret_cast < T * > ( _data . data ( ) ) ;
}
/** @overload */
template < class T = char > const T * data ( ) const {
/**
* @ brief Image data in a particular type
* @ deprecated Use non - templated @ ref data ( ) together with
* @ ref Corrade : : Containers : : arrayCast ( ) instead for properly
* bounds - checked type conversion .
*/
template < class T > CORRADE_DEPRECATED ( " use data() together with Containers::arrayCast() instead " ) const T * data ( ) const {
return reinterpret_cast < const T * > ( _data . data ( ) ) ;
}
# endif
/**
* @ brief View on pixel data
@ -580,15 +592,27 @@ template<UnsignedInt dimensions> class CompressedImage {
/** @overload */
Containers : : ArrayView < const char > data ( ) const { return _data ; }
/** @overload */
template < class T > T * data ( ) {
# ifdef MAGNUM_BUILD_DEPRECATED
/**
* @ brief Image data in a particular type
* @ deprecated Use non - templated @ ref data ( ) together with
* @ ref Corrade : : Containers : : arrayCast ( ) instead for properly
* bounds - checked type conversion .
*/
template < class T > CORRADE_DEPRECATED ( " use data() together with Containers::arrayCast() instead " ) T * data ( ) {
return reinterpret_cast < T * > ( _data . data ( ) ) ;
}
/** @overload */
template < class T > const T * data ( ) const {
/**
* @ brief Image data in a particular type
* @ deprecated Use non - templated @ ref data ( ) together with
* @ ref Corrade : : Containers : : arrayCast ( ) instead for properly
* bounds - checked type conversion .
*/
template < class T > CORRADE_DEPRECATED ( " use data() together with Containers::arrayCast() instead " ) const T * data ( ) const {
return reinterpret_cast < const T * > ( _data . data ( ) ) ;
}
# endif
/**
* @ brief Release data storage