From 663e030d41cb56507503377aaf71c8fe9891e0b5 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 19 Feb 2011 03:01:13 +0000 Subject: [PATCH] be explicit about types for unicode - allows compile with nacl-g++ --- include/mapnik/text_path.hpp | 3 ++- include/mapnik/value.hpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/mapnik/text_path.hpp b/include/mapnik/text_path.hpp index 84fcafea6..e06e4b9bb 100644 --- a/include/mapnik/text_path.hpp +++ b/include/mapnik/text_path.hpp @@ -100,7 +100,8 @@ public: bool has_line_breaks() const { - return (text_.indexOf('\n') >= 0); + UChar break_char = '\n'; + return (text_.indexOf(break_char) >= 0); } }; diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 3d9a6f929..9870581a7 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -49,9 +49,9 @@ inline void to_utf8(UnicodeString const& input, std::string & target) { if (input.length() == 0) return; - const int BUF_SIZE = 256; + const int32_t BUF_SIZE = 256; char buf [BUF_SIZE]; - int len; + int32_t len; UErrorCode err = U_ZERO_ERROR; u_strToUTF8(buf, BUF_SIZE, &len, input.getBuffer(), input.length(), &err);