Skip to content

Commit

Permalink
appease gcc method overload warning
Browse files Browse the repository at this point in the history
  • Loading branch information
genivia-inc committed Nov 25, 2024
1 parent df51d8a commit 3445a32
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
3 changes: 2 additions & 1 deletion fuzzy/fuzzymatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ class FuzzyMatcher : public Matcher {
DBGLOG("FuzzyMatcher::FuzzyMatcher(matcher)");
bpt_.resize(max_);
}
using Matcher::operator=;
/// Assign a matcher.
FuzzyMatcher& operator=(const FuzzyMatcher& matcher) ///< matcher to copy
virtual FuzzyMatcher& operator=(const FuzzyMatcher& matcher) ///< matcher to copy
{
Matcher::operator=(matcher);
max_ = matcher.max_;
Expand Down
3 changes: 2 additions & 1 deletion include/reflex/boostmatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class BoostMatcher : public PatternMatcher<boost::regex> {
PatternMatcher<boost::regex>(matcher),
flg_(matcher.flg_)
{ }
using PatternMatcher::operator=;
/// Assign a matcher.
BoostMatcher& operator=(const BoostMatcher& matcher) ///< matcher to copy
virtual BoostMatcher& operator=(const BoostMatcher& matcher) ///< matcher to copy
{
PatternMatcher<boost::regex>::operator=(matcher);
flg_ = matcher.flg_;
Expand Down
3 changes: 2 additions & 1 deletion include/reflex/fuzzymatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ class FuzzyMatcher : public Matcher {
DBGLOG("FuzzyMatcher::FuzzyMatcher(matcher)");
bpt_.resize(max_);
}
using Matcher::operator=;
/// Assign a matcher.
FuzzyMatcher& operator=(const FuzzyMatcher& matcher) ///< matcher to copy
virtual FuzzyMatcher& operator=(const FuzzyMatcher& matcher) ///< matcher to copy
{
Matcher::operator=(matcher);
max_ = matcher.max_;
Expand Down
14 changes: 8 additions & 6 deletions include/reflex/matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Matcher : public PatternMatcher<reflex::Pattern> {
template<typename T>
static std::string convert(T regex, convert_flag_type flags = convert_flag::none, bool *multiline = NULL)
{
return reflex::convert(regex, "imsx#=^:abcdefhijklnrstuvwxzABDHLNQSUW<>?", flags, multiline);
return reflex::convert(regex, "imsx#=^:abcdefhijklnrstuvwxzABDHLNQSUW0<>?", flags, multiline);
}
/// Default constructor.
Matcher() : PatternMatcher<reflex::Pattern>()
Expand Down Expand Up @@ -107,17 +107,19 @@ class Matcher : public PatternMatcher<reflex::Pattern> {
DBGLOG("Matcher::Matcher(matcher)");
init_advance();
}
using PatternMatcher::operator=;
/// Assign a matcher, the underlying pattern string is shared (not deep copied).
Matcher& operator=(const Matcher& matcher) ///< matcher to copy
virtual Matcher& operator=(const Matcher& matcher) ///< matcher to copy
{
PatternMatcher<reflex::Pattern>::operator=(matcher);
ded_ = matcher.ded_;
tab_ = matcher.tab_;
init_advance();
return *this;
}
using PatternMatcher::pattern;
/// Set the pattern to use with this matcher (the given pattern is shared and must be persistent).
Matcher& pattern(const Pattern& pattern) ///< pattern object for this matcher
virtual Matcher& pattern(const Pattern& pattern) ///< pattern object for this matcher
/// @returns this matcher
{
DBGLOG("Matcher::pattern()");
Expand All @@ -129,7 +131,7 @@ class Matcher : public PatternMatcher<reflex::Pattern> {
return *this;
}
/// Set the pattern to use with this matcher (the given pattern is shared and must be persistent).
Matcher& pattern(const Pattern *pattern) ///< pattern object for this matcher
virtual Matcher& pattern(const Pattern *pattern) ///< pattern object for this matcher
/// @returns this matcher
{
DBGLOG("Matcher::pattern()");
Expand All @@ -141,7 +143,7 @@ class Matcher : public PatternMatcher<reflex::Pattern> {
return *this;
}
/// Set the pattern from a regex string to use with this matcher.
Matcher& pattern(const char *pattern) ///< regex string to instantiate internal pattern object
virtual Matcher& pattern(const char *pattern) ///< regex string to instantiate internal pattern object
/// @returns this matcher
{
DBGLOG("Matcher::pattern(\"%s\")", pattern);
Expand All @@ -150,7 +152,7 @@ class Matcher : public PatternMatcher<reflex::Pattern> {
return *this;
}
/// Set the pattern from a regex string to use with this matcher.
Matcher& pattern(const std::string& pattern) ///< regex string to instantiate internal pattern object
virtual Matcher& pattern(const std::string& pattern) ///< regex string to instantiate internal pattern object
/// @returns this matcher
{
DBGLOG("Matcher::pattern(\"%s\")", pattern.c_str());
Expand Down
4 changes: 3 additions & 1 deletion include/reflex/pcre2matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ class PCRE2Matcher : public PatternMatcher<std::string> {
if (opc_ != NULL)
pcre2_code_free(opc_);
}
using PatternMatcher::operator=;
/// Assign a matcher.
PCRE2Matcher& operator=(const PCRE2Matcher& matcher) ///< matcher to copy
virtual PCRE2Matcher& operator=(const PCRE2Matcher& matcher) ///< matcher to copy
{
PatternMatcher<std::string>::operator=(matcher);
pattern(matcher);
Expand Down Expand Up @@ -488,6 +489,7 @@ class PCRE2UTFMatcher : public PCRE2Matcher {
:
PCRE2Matcher(pattern, input, opt, PCRE2_UTF | PCRE2_UCP)
{ }
using PCRE2Matcher::operator=;
};

} // namespace reflex
Expand Down
1 change: 1 addition & 0 deletions include/reflex/stdmatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class StdMatcher : public PatternMatcher<std::regex> {
PatternMatcher<std::regex>(matcher),
flg_(matcher.flg_)
{ }
using PatternMatcher::operator=;
/// Assign a matcher.
StdMatcher& operator=(const StdMatcher& matcher) ///< matcher to copy
{
Expand Down

0 comments on commit 3445a32

Please sign in to comment.