From ec7e55c86b12403bf0b6e869339c24cbbd4fcdff Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Jun 2013 08:58:50 +0000 Subject: [PATCH] string offsets of type size_t --- src/filter_http_rewrite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 55ae35c..5259fc3 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -203,7 +203,7 @@ const std::string yf::HttpRewrite::Rules::test_patterns( std::map & vars, const std::string & txt) const { - for (unsigned i = 0; i < rules.size(); i++) + for (size_t i = 0; i < rules.size(); i++) { std::string out = rules[i].search_replace(vars, txt); if (!out.empty()) return out; @@ -224,7 +224,7 @@ const std::string yf::HttpRewrite::Rule::search_replace( std::string out; while (regex_search(start, end, what, re)) //find next full match { - unsigned i; + size_t i; for (i = 1; i < what.size(); ++i) { //check if the group is named @@ -257,7 +257,7 @@ void yf::HttpRewrite::Rule::parse_groups() bool esc = false; const std::string & str = regex; yaz_log(YLOG_LOG, "Parsing groups from '%s'", str.c_str()); - for (unsigned i = 0; i < str.size(); ++i) + for (size_t i = 0; i < str.size(); ++i) { if (!esc && str[i] == '\\') { @@ -315,7 +315,7 @@ std::string yf::HttpRewrite::Rule::sub_vars ( std::string out; bool esc = false; const std::string & in = recipe; - for (unsigned i = 0; i < in.size(); ++i) + for (size_t i = 0; i < in.size(); ++i) { if (!esc && in[i] == '\\') { -- 1.7.10.4