File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ auto SchemaTransformer::apply(
147
147
const std::optional<JSON::String> &default_id) const -> bool {
148
148
// There is no point in applying an empty bundle
149
149
assert (!this ->rules .empty ());
150
- std::set<std::pair<Pointer, JSON::String>> processed_rules;
150
+ std::set<std::pair<const JSON *, const JSON::String * >> processed_rules;
151
151
152
152
bool result{true };
153
153
while (true ) {
@@ -183,7 +183,8 @@ auto SchemaTransformer::apply(
183
183
continue ;
184
184
}
185
185
186
- if (processed_rules.contains ({entry.second .pointer , name})) {
186
+ std::pair<const JSON *, const JSON::String *> mark{¤t, &name};
187
+ if (processed_rules.contains (mark)) {
187
188
// TODO: Throw a better custom error that also highlights the schema
188
189
// location
189
190
std::ostringstream error;
@@ -221,7 +222,7 @@ auto SchemaTransformer::apply(
221
222
set (schema, reference.first .second , JSON{original.recompose ()});
222
223
}
223
224
224
- processed_rules.emplace (entry. second . pointer , name );
225
+ processed_rules.emplace (std::move (mark) );
225
226
goto core_transformer_start_again;
226
227
}
227
228
}
You can’t perform that action at this time.
0 commit comments