diff options
author | thestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-11 03:47:07 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-11 03:47:07 +0000 |
commit | 88ccbb4804a9cb3d0a3274bbe9ad7e37e5e1d5dc (patch) | |
tree | 15cfafc0af7ffb76aa3bcf41c4588b1da863d835 | |
parent | Fixed "unused method" warning, reported by Xcode 4.2 on simulator. (diff) | |
download | breakpad-88ccbb4804a9cb3d0a3274bbe9ad7e37e5e1d5dc.tar.xz |
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
-rw-r--r-- | src/common/string_conversion.cc | 4 |
1 files 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<u_int16_t> *out) { const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(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<u_int16_t> *out) { const UTF32 *source_ptr = reinterpret_cast<const UTF32 *>(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); |