diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-20 21:31:41 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-20 21:31:41 -0700 |
commit | df9b8f8ae7a540988c20fdffaaff2442c349873a (patch) | |
tree | ff9be69934b6896c8d7e91412b63dd9cd9b37341 /src/SimpleMustache.cc | |
parent | fcc66ce9f5d6db995536beab5539fd47e490bf14 (diff) |
Moving tokenize, percentEncode and percentDecode around. Fixing a few warnings. Workarounding c-ares and pthreads compilation issue with unicode.
Diffstat (limited to 'src/SimpleMustache.cc')
-rw-r--r-- | src/SimpleMustache.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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<size_t>(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++ = '&'; |