From 23737a716b132b2e5e27eb3c7062f11935be7c5a Mon Sep 17 00:00:00 2001 From: yhirose Date: Mon, 10 Aug 2015 16:37:25 -0400 Subject: [PATCH] Fixed warnings. --- peglib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peglib.h b/peglib.h index 9a0b709..2ed79e0 100644 --- a/peglib.h +++ b/peglib.h @@ -617,7 +617,7 @@ public: ZeroOrMore(const std::shared_ptr& ope) : ope_(ope) {} size_t parse(const char* s, size_t n, SemanticValues& sv, Context& c, any& dt) const override { - auto i = 0; + size_t i = 0; while (n - i > 0) { const auto& rule = *ope_; auto len = rule.parse(s + i, n - i, sv, c, dt); @@ -1922,7 +1922,7 @@ private: std::string r; r.reserve(n); - auto i = 0u; + size_t i = 0; while (i < n) { auto ch = s[i]; if (ch == '\\') {