Skip to content

Commit

Permalink
move shared pointer declaration to use it earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed May 30, 2024
1 parent c6ae831 commit 3e744b1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions keyvi/include/keyvi/dictionary/match.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@
namespace keyvi {
namespace dictionary {
struct Match;
}

using match_t = std::shared_ptr<Match>;
} // namespace dictionary

namespace index {
namespace internal {
template <class MatcherT, class DeletedT>
std::shared_ptr<keyvi::dictionary::Match> NextFilteredMatch(const MatcherT&, const DeletedT&);
keyvi::dictionary::match_t NextFilteredMatch(const MatcherT&, const DeletedT&);
template <class MatcherT, class DeletedT>
std::shared_ptr<keyvi::dictionary::Match> FirstFilteredMatch(const MatcherT&, const DeletedT&);
keyvi::dictionary::match_t FirstFilteredMatch(const MatcherT&, const DeletedT&);
} // namespace internal
} // namespace index
namespace dictionary {
Expand Down Expand Up @@ -223,17 +226,15 @@ struct Match {

// friend for accessing the fsa
template <class MatcherT, class DeletedT>
friend std::shared_ptr<Match> index::internal::NextFilteredMatch(const MatcherT&, const DeletedT&);
friend match_t index::internal::NextFilteredMatch(const MatcherT&, const DeletedT&);
template <class MatcherT, class DeletedT>
friend std::shared_ptr<Match> index::internal::FirstFilteredMatch(const MatcherT&, const DeletedT&);
friend match_t index::internal::FirstFilteredMatch(const MatcherT&, const DeletedT&);

fsa::automata_t& GetFsa() {
return fsa_;
}
};

using match_t = std::shared_ptr<Match>;

} /* namespace dictionary */
} /* namespace keyvi */

Expand Down

0 comments on commit 3e744b1

Please sign in to comment.