From 3782a335d39afdf4b92eb92cab94321527973859 Mon Sep 17 00:00:00 2001 From: waylonis Date: Fri, 15 Dec 2006 00:09:07 +0000 Subject: Change function declarations to match those of the header file. Amazingly, gcc did not complain. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@89 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/string_conversion.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/common/string_conversion.cc') diff --git a/src/common/string_conversion.cc b/src/common/string_conversion.cc index 620a90db..e2345783 100644 --- a/src/common/string_conversion.cc +++ b/src/common/string_conversion.cc @@ -36,21 +36,21 @@ using std::vector; namespace google_airbag { -void UTF8ToUTF16(const char *in, vector &out) { +void UTF8ToUTF16(const char *in, vector *out) { size_t source_length = strlen(in); const UTF8 *source_ptr = reinterpret_cast(in); const UTF8 *source_end_ptr = source_ptr + source_length; // Erase the contents and zero fill to the expected size - out.empty(); - out.insert(out.begin(), source_length, 0); - u_int16_t *target_ptr = &out[0]; - u_int16_t *target_end_ptr = target_ptr + out.capacity() * sizeof(u_int16_t); + out->empty(); + out->insert(out->begin(), source_length, 0); + u_int16_t *target_ptr = &(*out)[0]; + u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, &target_ptr, target_end_ptr, strictConversion); // Resize to be the size of the # of converted characters + NULL - out.resize(result == conversionOK ? target_ptr - &out[0] + 1: 0); + out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); } int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]) { @@ -80,21 +80,21 @@ int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]) { return 0; } -void UTF32ToUTF16(const wchar_t *in, vector &out) { +void UTF32ToUTF16(const wchar_t *in, vector *out) { size_t source_length = wcslen(in); const UTF32 *source_ptr = reinterpret_cast(in); const UTF32 *source_end_ptr = source_ptr + source_length; // Erase the contents and zero fill to the expected size - out.empty(); - out.insert(out.begin(), source_length, 0); - u_int16_t *target_ptr = &out[0]; - u_int16_t *target_end_ptr = target_ptr + out.capacity() * sizeof(u_int16_t); + out->empty(); + out->insert(out->begin(), source_length, 0); + u_int16_t *target_ptr = &(*out)[0]; + u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, &target_ptr, target_end_ptr, strictConversion); // Resize to be the size of the # of converted characters + NULL - out.resize(result == conversionOK ? target_ptr - &out[0] + 1: 0); + out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); } void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]) { -- cgit v1.2.1