Make `similarity` arg optional. PolyMatchers already deal with NULL similarity correctly, so make it officially optional.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/aaf6abbe Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/aaf6abbe Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/aaf6abbe Branch: refs/heads/master Commit: aaf6abbe9909648b157dbaaabb1e84c71f47cb5a Parents: aa8e372 Author: Marvin Humphrey <[email protected]> Authored: Wed Aug 12 20:05:34 2015 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Wed Sep 9 18:25:24 2015 -0700 ---------------------------------------------------------------------- core/Lucy/Search/ANDMatcher.cfh | 4 ++-- core/Lucy/Search/ORMatcher.cfh | 4 ++-- core/Lucy/Search/PolyMatcher.cfh | 4 ++-- core/Lucy/Search/RequiredOptionalMatcher.cfh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/aaf6abbe/core/Lucy/Search/ANDMatcher.cfh ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/ANDMatcher.cfh b/core/Lucy/Search/ANDMatcher.cfh index 3e624c7..00e9cec 100644 --- a/core/Lucy/Search/ANDMatcher.cfh +++ b/core/Lucy/Search/ANDMatcher.cfh @@ -26,10 +26,10 @@ class Lucy::Search::ANDMatcher inherits Lucy::Search::PolyMatcher { bool first_time; inert incremented ANDMatcher* - new(Vector *children, Similarity *sim); + new(Vector *children, Similarity *sim = NULL); inert ANDMatcher* - init(ANDMatcher *self, Vector *children, Similarity *similarity); + init(ANDMatcher *self, Vector *children, Similarity *similarity = NULL); public void Destroy(ANDMatcher *self); http://git-wip-us.apache.org/repos/asf/lucy/blob/aaf6abbe/core/Lucy/Search/ORMatcher.cfh ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/ORMatcher.cfh b/core/Lucy/Search/ORMatcher.cfh index 89aaab9..97fcc0d 100644 --- a/core/Lucy/Search/ORMatcher.cfh +++ b/core/Lucy/Search/ORMatcher.cfh @@ -79,10 +79,10 @@ class Lucy::Search::ORScorer inherits Lucy::Search::ORMatcher { int32_t doc_id; inert incremented ORScorer* - new(Vector *children, Similarity *similarity); + new(Vector *children, Similarity *similarity = NULL); inert ORScorer* - init(ORScorer *self, Vector *children, Similarity *similarity); + init(ORScorer *self, Vector *children, Similarity *similarity = NULL); public void Destroy(ORScorer *self); http://git-wip-us.apache.org/repos/asf/lucy/blob/aaf6abbe/core/Lucy/Search/PolyMatcher.cfh ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/PolyMatcher.cfh b/core/Lucy/Search/PolyMatcher.cfh index 9b9c9c8..d3e27cb 100644 --- a/core/Lucy/Search/PolyMatcher.cfh +++ b/core/Lucy/Search/PolyMatcher.cfh @@ -28,10 +28,10 @@ class Lucy::Search::PolyMatcher inherits Lucy::Search::Matcher { float *coord_factors; inert incremented PolyMatcher* - new(Vector *children, Similarity *similarity); + new(Vector *children, Similarity *similarity = NULL); inert PolyMatcher* - init(PolyMatcher *self, Vector *children, Similarity *similarity); + init(PolyMatcher *self, Vector *children, Similarity *similarity = NULL); public void Destroy(PolyMatcher *self); http://git-wip-us.apache.org/repos/asf/lucy/blob/aaf6abbe/core/Lucy/Search/RequiredOptionalMatcher.cfh ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/RequiredOptionalMatcher.cfh b/core/Lucy/Search/RequiredOptionalMatcher.cfh index 4a86d93..be5a82a 100644 --- a/core/Lucy/Search/RequiredOptionalMatcher.cfh +++ b/core/Lucy/Search/RequiredOptionalMatcher.cfh @@ -27,11 +27,11 @@ class Lucy::Search::RequiredOptionalMatcher nickname ReqOptMatcher bool opt_matcher_first_time; inert incremented RequiredOptionalMatcher* - new(Similarity *similarity, Matcher *required_matcher, + new(Similarity *similarity = NULL, Matcher *required_matcher, Matcher *optional_matcher = NULL); inert RequiredOptionalMatcher* - init(RequiredOptionalMatcher *self, Similarity *similarity, + init(RequiredOptionalMatcher *self, Similarity *similarity = NULL, Matcher *required_matcher, Matcher *optional_matcher = NULL); public void
