From e3f5ba35db040913c15f561c40bbadcf51d0892f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 11 Aug 2023 00:58:34 +0100 Subject: Fix weird bracing --- slicer/xml/serializer.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index 369394e..5eab4be 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -379,18 +379,16 @@ namespace Slicer { else if (hp && hp->GetMetadata().flagSet(md_elements)) { ModelTreeIterateDictElements(n->add_child_element(name), mp); } + else if (hp && hp->GetMetadata().flagSet(md_bare)) { + ModelTreeProcessElement(n, mp, [name](auto && PH1, auto &&) { + return PH1->add_child_element(name); + }); + } else { - if (hp && hp->GetMetadata().flagSet(md_bare)) { - ModelTreeProcessElement(n, mp, [name](auto && PH1, auto &&) { - return PH1->add_child_element(name); - }); - } - else { - CurrentElementCreator cec([ec, n, name] { - return ec(n, name); - }); - ModelTreeProcessElement(cec, mp, defaultElementCreator); - } + CurrentElementCreator cec([ec, n, name] { + return ec(n, name); + }); + ModelTreeProcessElement(cec, mp, defaultElementCreator); } } -- cgit v1.2.3