mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2025-01-22 21:35:29 +00:00
Fix compiler warnings about incomplete override functions
The warning on VS2013 was: warning C4266: 'void peg::Ope::Visitor::visit(peg::Whitespace &)' : no override available for virtual member function from base 'peg::Ope::Visitor'; function is hidden I'm surprised that this warning doesn't happen on gcc/clang though.
This commit is contained in:
parent
b07573e64f
commit
47f8eb171c
6
peglib.h
6
peglib.h
@ -1104,6 +1104,8 @@ struct Ope::Visitor
|
|||||||
|
|
||||||
struct AssignIDToDefinition : public Ope::Visitor
|
struct AssignIDToDefinition : public Ope::Visitor
|
||||||
{
|
{
|
||||||
|
using Ope::Visitor::visit;
|
||||||
|
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto op: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
op->accept(*this);
|
op->accept(*this);
|
||||||
@ -1133,6 +1135,8 @@ struct IsToken : public Ope::Visitor
|
|||||||
{
|
{
|
||||||
IsToken() : has_token_boundary(false), has_rule(false) {}
|
IsToken() : has_token_boundary(false), has_rule(false) {}
|
||||||
|
|
||||||
|
using Ope::Visitor::visit;
|
||||||
|
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto op: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
op->accept(*this);
|
op->accept(*this);
|
||||||
@ -1661,6 +1665,8 @@ private:
|
|||||||
DetectLeftRecursion(const std::string& name)
|
DetectLeftRecursion(const std::string& name)
|
||||||
: s_(nullptr), name_(name), done_(false) {}
|
: s_(nullptr), name_(name), done_(false) {}
|
||||||
|
|
||||||
|
using Ope::Visitor::visit;
|
||||||
|
|
||||||
void visit(Sequence& ope) override {
|
void visit(Sequence& ope) override {
|
||||||
for (auto op: ope.opes_) {
|
for (auto op: ope.opes_) {
|
||||||
op->accept(*this);
|
op->accept(*this);
|
||||||
|
Loading…
Reference in New Issue
Block a user