diff --git a/src/Magnum/Test/ImageViewTest.cpp b/src/Magnum/Test/ImageViewTest.cpp index 6c218fc4a..ae65cfef9 100644 --- a/src/Magnum/Test/ImageViewTest.cpp +++ b/src/Magnum/Test/ImageViewTest.cpp @@ -103,11 +103,14 @@ void ImageViewTest::constructCompressed() { #ifdef MAGNUM_BUILD_DEPRECATED void ImageViewTest::constructDeprecatedArrayView() { - const char data[12]{}; - Containers::ArrayView view{data}; + char data[12]{}; + Containers::ArrayView view{data}; ImageView2D a{PixelFormat::RGB, PixelType::UnsignedByte, {1, 3}, view}; - CORRADE_COMPARE(a.data(), data); + + Containers::ArrayView cview{data}; + ImageView2D b{PixelFormat::RGB, PixelType::UnsignedByte, {1, 3}, cview}; + CORRADE_COMPARE(b.data(), data); } void ImageViewTest::constructDeprecatedArray() {