mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-30 20:44:15 +01:00
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
This commit is contained in:
parent
a66d4b272a
commit
88ccbb4804
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user