@@ -217,12 +217,17 @@ auto store(
217
217
instance_locations.cbegin (), instance_locations.cend ())
218
218
.size () == instance_locations.size ());
219
219
const auto canonical{sourcemeta::core::URI::canonicalize (uri)};
220
- const auto inserted{
221
- frame
222
- .insert ({{type, canonical},
223
- {parent, entry_type, root_id, base_id, pointer_from_root,
224
- pointer_from_base, dialect, base_dialect}})
225
- .second };
220
+ const auto inserted{frame
221
+ .insert ({{type, canonical},
222
+ {.parent = parent,
223
+ .type = entry_type,
224
+ .root = root_id,
225
+ .base = base_id,
226
+ .pointer = pointer_from_root,
227
+ .relative_pointer = pointer_from_base,
228
+ .dialect = dialect,
229
+ .base_dialect = base_dialect}})
230
+ .second };
226
231
if (!ignore_if_present && !inserted) {
227
232
throw_already_exists (uri);
228
233
}
@@ -493,12 +498,15 @@ auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker,
493
498
entry.pointer .empty () ? default_id : std::nullopt)};
494
499
495
500
// Store information
496
- subschemas.emplace (entry.pointer ,
497
- CacheSubschema{entry.instance_location ,
498
- entry.relative_instance_location ,
499
- entry.orphan , entry.parent });
501
+ subschemas.emplace (
502
+ entry.pointer ,
503
+ CacheSubschema{.instance_location = entry.instance_location ,
504
+ .relative_instance_location =
505
+ entry.relative_instance_location ,
506
+ .orphan = entry.orphan ,
507
+ .parent = entry.parent });
500
508
subschema_entries.emplace_back (
501
- InternalEntry{std::move (entry), std::move (id)});
509
+ InternalEntry{. common = std::move (entry), . id = std::move (id)});
502
510
current_subschema_entries.emplace_back (subschema_entries.size () - 1 );
503
511
}
504
512
@@ -602,9 +610,10 @@ auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker,
602
610
{SchemaReferenceType::Static,
603
611
entry.common .pointer .concat ({" $schema" })},
604
612
SchemaFrame::ReferencesEntry{
605
- maybe_metaschema.value (), destination,
606
- metaschema.recompose_without_fragment (),
607
- fragment_string (metaschema)});
613
+ .original = maybe_metaschema.value (),
614
+ .destination = destination,
615
+ .base = metaschema.recompose_without_fragment (),
616
+ .fragment = fragment_string (metaschema)});
608
617
}
609
618
}
610
619
@@ -809,9 +818,11 @@ auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker,
809
818
this ->references_ .insert_or_assign (
810
819
{SchemaReferenceType::Static,
811
820
entry.common .pointer .concat ({" $ref" })},
812
- SchemaFrame::ReferencesEntry{original, ref.recompose (),
813
- ref.recompose_without_fragment (),
814
- fragment_string (ref)});
821
+ SchemaFrame::ReferencesEntry{.original = original,
822
+ .destination = ref.recompose (),
823
+ .base =
824
+ ref.recompose_without_fragment (),
825
+ .fragment = fragment_string (ref)});
815
826
}
816
827
817
828
if (entry.common .vocabularies .contains (
@@ -842,9 +853,10 @@ auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker,
842
853
this ->references_ .insert_or_assign (
843
854
{reference_type, entry.common .pointer .concat ({" $recursiveRef" })},
844
855
SchemaFrame::ReferencesEntry{
845
- ref, anchor_uri.recompose (),
846
- anchor_uri.recompose_without_fragment (),
847
- fragment_string (anchor_uri)});
856
+ .original = ref,
857
+ .destination = anchor_uri.recompose (),
858
+ .base = anchor_uri.recompose_without_fragment (),
859
+ .fragment = fragment_string (anchor_uri)});
848
860
}
849
861
850
862
if (entry.common .vocabularies .contains (
@@ -878,9 +890,11 @@ auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker,
878
890
{behaves_as_static ? SchemaReferenceType::Static
879
891
: SchemaReferenceType::Dynamic,
880
892
entry.common .pointer .concat ({" $dynamicRef" })},
881
- SchemaFrame::ReferencesEntry{original, std::move (ref_string),
882
- ref.recompose_without_fragment (),
883
- fragment_string (ref)});
893
+ SchemaFrame::ReferencesEntry{.original = original,
894
+ .destination = std::move (ref_string),
895
+ .base =
896
+ ref.recompose_without_fragment (),
897
+ .fragment = fragment_string (ref)});
884
898
}
885
899
}
886
900
}
0 commit comments