From: Adam Dickmeiss Date: Wed, 19 Jun 2013 08:58:50 +0000 (+0000) Subject: string offsets of type size_t X-Git-Tag: v1.3.59~57^2~3 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ec7e55c86b12403bf0b6e869339c24cbbd4fcdff;p=metaproxy-moved-to-github.git string offsets of type size_t --- 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] == '\\') {