diff --git a/src/alterschema/transformer.cc b/src/alterschema/transformer.cc index f891e376..3dc7d552 100644 --- a/src/alterschema/transformer.cc +++ b/src/alterschema/transformer.cc @@ -14,11 +14,10 @@ namespace { struct ProcessedRuleHasher { - auto - operator()(const std::tuple &value) const noexcept + auto operator()(const std::tuple &value) const noexcept -> std::size_t { - return std::hash{}(std::get<0>(value)) ^ + return sourcemeta::core::Pointer::Hasher{}(std::get<0>(value)) ^ (std::hash{}(std::get<1>(value)) << 1) ^ (std::hash{}(std::get<2>(value)) << 2); } @@ -198,9 +197,8 @@ auto SchemaTransformer::apply(core::JSON &schema, const core::JSON::String &exclude_keyword) const -> std::pair { assert(!this->rules.empty()); - std::unordered_set< - std::tuple, - ProcessedRuleHasher> + std::unordered_set, + ProcessedRuleHasher> processed_rules; core::SchemaFrame frame{core::SchemaFrame::Mode::References}; @@ -285,8 +283,8 @@ auto SchemaTransformer::apply(core::JSON &schema, analyse_frame(frame, schema, walker, resolver, default_dialect, default_id); } else if (current.is_boolean()) { - std::tuple mark{ - ¤t, rule->name(), current.fast_hash()}; + std::tuple mark{ + entry_pointer, rule->name(), current.fast_hash()}; if (processed_rules.contains(mark)) { throw SchemaTransformRuleProcessedTwiceError(rule->name(), entry_pointer); @@ -343,8 +341,8 @@ auto SchemaTransformer::apply(core::JSON &schema, references_fixed = true; } - std::tuple mark{ - ¤t, rule->name(), current.fast_hash()}; + std::tuple mark{ + entry_pointer, rule->name(), current.fast_hash()}; if (processed_rules.contains(mark)) { throw SchemaTransformRuleProcessedTwiceError(rule->name(), entry_pointer);