From 88ccbb4804a9cb3d0a3274bbe9ad7e37e5e1d5dc Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Wed, 11 Apr 2012 03:47:07 +0000 Subject: [PATCH] vectors are cleared with "clear()", not with "empty() A=thakis@chromium.org R=thestig@chromium.org Original code review: https://breakpad.appspot.com/377003/ Review URL: https://breakpad.appspot.com/380001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@949 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/string_conversion.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/string_conversion.cc b/src/common/string_conversion.cc index 5af12f5a..ac4f1da5 100644 --- a/src/common/string_conversion.cc +++ b/src/common/string_conversion.cc @@ -42,7 +42,7 @@ void UTF8ToUTF16(const char *in, vector *out) { 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->clear(); 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); @@ -86,7 +86,7 @@ void UTF32ToUTF16(const wchar_t *in, vector *out) { 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->clear(); 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);