diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2023-07-19 00:24:28 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahooinc.com> | 2023-07-19 00:24:28 +0200 |
commit | fc5462484791c55df93fdb20dcf81504b945f0f0 (patch) | |
tree | c5d1dd4b0bd76e8e19facc7c858f71aaa8b401ad | |
parent | 62a0819f689a7d5784d301f968494d0feaf978a4 (diff) |
Backport to clang 15.
4 files changed, 8 insertions, 7 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp index c893bb6fe2b..dbf1f32c2f4 100644 --- a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp @@ -9,6 +9,7 @@ #include <vespa/vespalib/util/resource_limits.h> #include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/alloc.h> +#include <unistd.h> #include <filesystem> #include <thread> diff --git a/vespalib/src/vespa/vespalib/fuzzy/dfa_stepping_base.h b/vespalib/src/vespa/vespalib/fuzzy/dfa_stepping_base.h index 7e7881c5a14..cc97dc2da29 100644 --- a/vespalib/src/vespa/vespalib/fuzzy/dfa_stepping_base.h +++ b/vespalib/src/vespa/vespalib/fuzzy/dfa_stepping_base.h @@ -8,8 +8,8 @@ namespace vespalib::fuzzy { template <typename Traits> struct DfaSteppingBase { - using StateType = Traits::StateType; - using TransitionsType = Traits::TransitionsType; + using StateType = typename Traits::StateType; + using TransitionsType = typename Traits::TransitionsType; std::span<const uint32_t> _u32_str; // TODO std::u32string_view diff --git a/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.h b/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.h index 49baad21530..8a4c9bab2b4 100644 --- a/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.h +++ b/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.h @@ -77,7 +77,7 @@ struct DfaNode { void add_match_out_edge(uint32_t out_char, uint32_t out_node) noexcept { assert(num_match_out_edges < MaxCharOutEdges); - match_out_edges_buf[num_match_out_edges] = Edge(out_char, out_node); + match_out_edges_buf[num_match_out_edges] = Edge{out_char, out_node}; ++num_match_out_edges; } diff --git a/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.hpp b/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.hpp index 0960219aff3..9a5d3d1bdc7 100644 --- a/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.hpp +++ b/vespalib/src/vespa/vespalib/fuzzy/explicit_levenshtein_dfa.hpp @@ -16,7 +16,7 @@ template <uint8_t MaxEdits> struct ExplicitDfaMatcher { using DfaNodeType = typename ExplicitLevenshteinDfaImpl<MaxEdits>::DfaNodeType; using StateType = const DfaNodeType*; - using EdgeType = const DfaNodeType::Edge*; + using EdgeType = const typename DfaNodeType::Edge*; using StateParamType = const DfaNodeType*; @@ -120,7 +120,7 @@ struct ExploreState { ExploreState(); ~ExploreState(); - [[nodiscard]] SparseExploredStates::iterator node_of(const StateType& state) { + [[nodiscard]] typename SparseExploredStates::iterator node_of(const StateType& state) { auto maybe_explored = explored_states.find(state); if (maybe_explored != explored_states.end()) { return maybe_explored; @@ -131,11 +131,11 @@ struct ExploreState { return explored_states.insert(std::make_pair(state, std::make_pair(this_node, false))).first; // not yet explored; } - [[nodiscard]] bool already_explored(const SparseExploredStates::iterator& node) const noexcept { + [[nodiscard]] bool already_explored(const typename SparseExploredStates::iterator& node) const noexcept { return node->second.second; } - void tag_as_explored(SparseExploredStates::iterator& node) noexcept { + void tag_as_explored(typename SparseExploredStates::iterator& node) noexcept { node->second.second = true; } }; |