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) {
union {
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
_dummy /* "error C2059: syntax error: ':'" otherwise, heh */
#endif

Loading…
Cancel
Save