From df9b8f8ae7a540988c20fdffaaff2442c349873a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 20 Jun 2014 21:31:41 -0700 Subject: Moving tokenize, percentEncode and percentDecode around. Fixing a few warnings. Workarounding c-ares and pthreads compilation issue with unicode. --- src/SimpleMustache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SimpleMustache.cc') diff --git a/src/SimpleMustache.cc b/src/SimpleMustache.cc index 557a183..bad2ab0 100644 --- a/src/SimpleMustache.cc +++ b/src/SimpleMustache.cc @@ -65,7 +65,7 @@ Balau::SimpleMustache::Context & Balau::SimpleMustache::Context::Proxy::operator m_idx = ctxLst.size() + m_idx + 1; if (m_idx <= 0) m_idx = 1; - if (ctxLst.size() < m_idx) + if (ctxLst.size() < static_cast(m_idx)) ctxLst.resize(m_idx); SubContext & subCtx = ctxLst[m_idx - 1]; SubContext::iterator s = subCtx.find(key); @@ -447,7 +447,7 @@ Balau::SimpleMustache::Fragments::const_iterator Balau::SimpleMustache::render_r Balau::String Balau::SimpleMustache::escape(const String & s) { int size = 0; - for (int i = 0; i < s.strlen(); i++) { + for (unsigned i = 0; i < s.strlen(); i++) { switch (s[i]) { case '&': size += 5; @@ -476,7 +476,7 @@ Balau::String Balau::SimpleMustache::escape(const String & s) { char * t = (char *) malloc(size + 1); char * p = t; - for (int i = 0; i < s.strlen(); i++) { + for (unsigned i = 0; i < s.strlen(); i++) { switch (s[i]) { case '&': *p++ = '&'; -- cgit v1.2.3