Browse Source

MSVC 2015 compatibility: apparently dereferencing pointer is verboten.

pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
9136007371
  1. 5
      src/Magnum/Math/Test/BoolVectorTest.cpp
  2. 5
      src/Magnum/Math/Test/RectangularMatrixTest.cpp
  3. 5
      src/Magnum/Math/Test/VectorTest.cpp

5
src/Magnum/Math/Test/BoolVectorTest.cpp

@ -143,7 +143,10 @@ void BoolVectorTest::data() {
constexpr bool b = a[9];
CORRADE_COMPARE(b, true);
constexpr UnsignedByte c = *a.data();
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Apparently dereferencing pointer is verboten */
constexpr
#endif
UnsignedByte c = *a.data();
CORRADE_COMPARE(c, 0x08);
BoolVector19 d(0x08, 0x03, 0x04);

5
src/Magnum/Math/Test/RectangularMatrixTest.cpp

@ -283,7 +283,10 @@ void RectangularMatrixTest::data() {
#endif
Vector4 b = a[2];
constexpr Float c = a[1][2];
constexpr Float d = *a.data();
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Apparently dereferencing pointer is verboten */
constexpr
#endif
Float d = *a.data();
CORRADE_COMPARE(b, Vector4(7.0f, -1.7f, 8.0f, 0.0f));
CORRADE_COMPARE(c, 7.0f);
CORRADE_COMPARE(d, 3.0f);

5
src/Magnum/Math/Test/VectorTest.cpp

@ -291,7 +291,10 @@ void VectorTest::data() {
/* Pointer chasings, i.e. *(b.data()[3]), are not possible */
constexpr Vector4 a(1.0f, 2.0f, -3.0f, 4.5f);
constexpr Float f = a[3];
constexpr Float g = *a.data();
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Apparently dereferencing pointer is verboten */
constexpr
#endif
Float g = *a.data();
CORRADE_COMPARE(f, 4.5f);
CORRADE_COMPARE(g, 1.0f);
}

Loading…
Cancel
Save