summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-08-11 00:58:34 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-08-11 00:58:34 +0100
commite3f5ba35db040913c15f561c40bbadcf51d0892f (patch)
treed9b14d8366ed11bab6c90d9c4437c92e0566d203
parentBit of dedupe in DocumentTreeIterateDictAttrs (diff)
downloadslicer-e3f5ba35db040913c15f561c40bbadcf51d0892f.tar.bz2
slicer-e3f5ba35db040913c15f561c40bbadcf51d0892f.tar.xz
slicer-e3f5ba35db040913c15f561c40bbadcf51d0892f.zip
Fix weird bracing
-rw-r--r--slicer/xml/serializer.cpp20
1 files 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);
}
}