Browse Source

Trade: can't define a bitfield out of different types on MSVC.

It does something completely insane if I do that, apparently. WHY.
pull/499/head
Vladimír Vondruš 3 years ago
parent
commit
fe345a6e63
  1. 5
      src/Magnum/Trade/SceneData.cpp

5
src/Magnum/Trade/SceneData.cpp

@ -640,7 +640,10 @@ namespace {
inline Long extractStringFieldOffset(const UnsignedLong strideOffset) { inline Long extractStringFieldOffset(const UnsignedLong strideOffset) {
union { union {
struct { struct {
Short /* Short would work on GCC / Clang but causes everything to catch
fire on MSVC. Somehow. Now I see why bitfields are not
recommended. */
Long
#ifdef CORRADE_MSVC2015_COMPATIBILITY #ifdef CORRADE_MSVC2015_COMPATIBILITY
_dummy /* "error C2059: syntax error: ':'" otherwise, heh */ _dummy /* "error C2059: syntax error: ':'" otherwise, heh */
#endif #endif

Loading…
Cancel
Save