Mark one-parameter constructors as explicit & use override where possible

This commit marks (hopefully) ever one-parameter constructor as explicit.

It also uses override in (hopefully) all circumstances where a virtual
method is overridden.

There are a very few other minor changes - most of them were necessary
to get everything to compile (like one additional constructor). In one
case I changed an implicit operation to an explicit string conversion -
I think the automatically chosen conversion was much more convoluted.

This took longer than I want to admit but not as long as I feared :)
This commit is contained in:
Johanna Amann 2018-03-16 22:14:22 -07:00
parent 1f2bf50b49
commit 6d612ced3d
173 changed files with 1052 additions and 1046 deletions

View file

@ -49,7 +49,7 @@ typedef enum { MATCH_ANYWHERE, MATCH_EXACTLY, } match_type;
class Specific_RE_Matcher {
public:
Specific_RE_Matcher(match_type mt, int multiline=0);
explicit Specific_RE_Matcher(match_type mt, int multiline=0);
~Specific_RE_Matcher();
void AddPat(const char* pat);
@ -133,7 +133,7 @@ protected:
class RE_Match_State {
public:
RE_Match_State(Specific_RE_Matcher* matcher)
explicit RE_Match_State(Specific_RE_Matcher* matcher)
{
dfa = matcher->DFA() ? matcher->DFA() : 0;
ecs = matcher->EC()->EquivClasses();
@ -172,8 +172,8 @@ protected:
class RE_Matcher : SerialObj {
public:
RE_Matcher();
RE_Matcher(const char* pat);
virtual ~RE_Matcher();
explicit RE_Matcher(const char* pat);
~RE_Matcher() override;
void AddPat(const char* pat);