From b035706a0b9331b5731a9ca93d65eefa412bacc2 Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 7 Aug 2015 23:49:21 -0400 Subject: [PATCH] Fixed compile errors with g++ 5.1. --- peglib.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/peglib.h b/peglib.h index 5d6702d..c1dc024 100644 --- a/peglib.h +++ b/peglib.h @@ -990,13 +990,13 @@ struct Ope::Visitor struct AssignIDToDefinition : public Ope::Visitor { void visit(Sequence& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); } } void visit(PrioritizedChoice& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); } } void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); } @@ -1019,13 +1019,13 @@ struct IsToken : public Ope::Visitor IsToken() : has_anchor(false), has_rule(false) {} void visit(Sequence& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); } } void visit(PrioritizedChoice& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); } } void visit(ZeroOrMore& ope) override { ope.ope_->accept(*this); } @@ -1482,8 +1482,8 @@ private: : s_(nullptr), name_(name), done_(false) {} void visit(Sequence& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); if (done_) { break; } else if (s_) { @@ -1493,8 +1493,8 @@ private: } } void visit(PrioritizedChoice& ope) override { - for (auto ope: ope.opes_) { - ope->accept(*this); + for (auto op: ope.opes_) { + op->accept(*this); if (s_) { done_ = true; break;