be explicit about types for unicode - allows compile with nacl-g++

This commit is contained in:
Dane Springmeyer 2011-02-19 03:01:13 +00:00
parent 25b9a6cf9f
commit 663e030d41
2 changed files with 4 additions and 3 deletions

View file

@ -100,7 +100,8 @@ public:
bool has_line_breaks() const bool has_line_breaks() const
{ {
return (text_.indexOf('\n') >= 0); UChar break_char = '\n';
return (text_.indexOf(break_char) >= 0);
} }
}; };

View file

@ -49,9 +49,9 @@ inline void to_utf8(UnicodeString const& input, std::string & target)
{ {
if (input.length() == 0) return; if (input.length() == 0) return;
const int BUF_SIZE = 256; const int32_t BUF_SIZE = 256;
char buf [BUF_SIZE]; char buf [BUF_SIZE];
int len; int32_t len;
UErrorCode err = U_ZERO_ERROR; UErrorCode err = U_ZERO_ERROR;
u_strToUTF8(buf, BUF_SIZE, &len, input.getBuffer(), input.length(), &err); u_strToUTF8(buf, BUF_SIZE, &len, input.getBuffer(), input.length(), &err);