diff options
author | Yi Wang <jswang@google.com> | 2017-10-27 10:46:15 -0700 |
---|---|---|
committer | Mark Mentovai <mark@chromium.org> | 2017-10-27 17:47:03 +0000 |
commit | fd0a0d2b7ae9dd3d8a02b6a12e7941f7189fbb6c (patch) | |
tree | 14d56efa21d732a00e3d560025aa1fdb5e5db6e4 /src/common/simple_string_dictionary.h | |
parent | Avoid skipping an initializer with a goto (diff) | |
download | breakpad-fd0a0d2b7ae9dd3d8a02b6a12e7941f7189fbb6c.tar.xz |
Create LongStringDictionary and replace SimpleStringDictionary usages in client/ios/Breakpad.mm.
Bug:
Change-Id: I401028f5d90417d79fb109b510aaa9660a039b44
Reviewed-on: https://chromium-review.googlesource.com/688301
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/simple_string_dictionary.h')
-rw-r--r-- | src/common/simple_string_dictionary.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/simple_string_dictionary.h b/src/common/simple_string_dictionary.h index d2ab17fd..28c4bf1c 100644 --- a/src/common/simple_string_dictionary.h +++ b/src/common/simple_string_dictionary.h @@ -209,20 +209,22 @@ class NonAllocatingMap { // Given |key|, removes any associated value. |key| must not be NULL. If // the key is not found, this is a noop. - void RemoveKey(const char* key) { + bool RemoveKey(const char* key) { assert(key); if (!key) - return; + return false; Entry* entry = GetEntryForKey(key); if (entry) { entry->key[0] = '\0'; entry->value[0] = '\0'; + return true; } #ifndef NDEBUG assert(GetEntryForKey(key) == NULL); #endif + return false; } // Places a serialized version of the map into |map| and returns the size. |