diff options
Diffstat (limited to 'unittests/Support')
-rw-r--r-- | unittests/Support/YAMLIOTest.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/unittests/Support/YAMLIOTest.cpp b/unittests/Support/YAMLIOTest.cpp index 0d6e3a0..f1ae33f 100644 --- a/unittests/Support/YAMLIOTest.cpp +++ b/unittests/Support/YAMLIOTest.cpp @@ -782,16 +782,14 @@ namespace yaml { struct MappingTraits<KindAndFlags> { static void mapping(IO &io, KindAndFlags& kf) { io.mapRequired("kind", kf.kind); - // type of flags field varies depending on kind field - + // Type of "flags" field varies depending on "kind" field. // Use memcpy here to avoid breaking strict aliasing rules. - if ( kf.kind == kindA ) { + if (kf.kind == kindA) { AFlags aflags; memcpy(&aflags, &kf.flags, sizeof(aflags)); io.mapRequired("flags", aflags); memcpy(&kf.flags, &aflags, sizeof(kf.flags)); - } - else { + } else { BFlags bflags; memcpy(&bflags, &kf.flags, sizeof(bflags)); io.mapRequired("flags", bflags); |