aboutsummaryrefslogtreecommitdiff
path: root/src/common/string_conversion.cc
diff options
context:
space:
mode:
authordmaclach <dmaclach@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-19 20:43:49 +0000
committerdmaclach <dmaclach@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-19 20:43:49 +0000
commit4ac61acb3a7dad6ce722fe07564be8ec92713228 (patch)
treefb71c49eb2aa7ca1f1867854ad9871c84504bc46 /src/common/string_conversion.cc
parentBreakpad Linux/Mac symbol dumper: Share duplicate strings that arise in DWARF... (diff)
downloadbreakpad-4ac61acb3a7dad6ce722fe07564be8ec92713228.tar.xz
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
Diffstat (limited to 'src/common/string_conversion.cc')
-rw-r--r--src/common/string_conversion.cc7
1 files changed, 3 insertions, 4 deletions
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<const UTF8 *>(in);
+ return static_cast<int>(source_ptr - reinterpret_cast<const UTF8 *>(in));
// Add another character to the input stream and try again
source_ptr = reinterpret_cast<const UTF8 *>(in);
@@ -135,7 +135,7 @@ string UTF16ToUTF8(const vector<u_int16_t> &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<UTF8> 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<u_int16_t> &in, bool swap) {
if (result == conversionOK) {
const char *targetPtr = reinterpret_cast<const char *>(target_buffer.get());
- string result(targetPtr);
- return result;
+ return targetPtr;
}
return "";