From 4ac61acb3a7dad6ce722fe07564be8ec92713228 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Mon, 19 Jul 2010 20:43:49 +0000 Subject: Clean up build for 64 bit. Fix up some broken mac projects. Consolidate project settings in xcconfig files. http://breakpad.appspot.com/130001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/string_conversion.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/common/string_conversion.cc') diff --git a/src/common/string_conversion.cc b/src/common/string_conversion.cc index 50054ebc..5af12f5a 100644 --- a/src/common/string_conversion.cc +++ b/src/common/string_conversion.cc @@ -68,7 +68,7 @@ int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]) { strictConversion); if (result == conversionOK) - return source_ptr - reinterpret_cast(in); + return static_cast(source_ptr - reinterpret_cast(in)); // Add another character to the input stream and try again source_ptr = reinterpret_cast(in); @@ -135,7 +135,7 @@ string UTF16ToUTF8(const vector &in, bool swap) { // The maximum expansion would be 4x the size of the input string. const UTF16 *source_end_ptr = source_ptr + in.size(); - int target_capacity = in.size() * 4; + size_t target_capacity = in.size() * 4; scoped_array target_buffer(new UTF8[target_capacity]); UTF8 *target_ptr = target_buffer.get(); UTF8 *target_end_ptr = target_ptr + target_capacity; @@ -145,8 +145,7 @@ string UTF16ToUTF8(const vector &in, bool swap) { if (result == conversionOK) { const char *targetPtr = reinterpret_cast(target_buffer.get()); - string result(targetPtr); - return result; + return targetPtr; } return ""; -- cgit v1.2.1