aboutsummaryrefslogtreecommitdiff
path: root/src/common/simple_string_dictionary.h
diff options
context:
space:
mode:
authorYi Wang <jswang@google.com>2017-11-02 11:43:35 -0700
committerMark Mentovai <mark@chromium.org>2017-11-03 17:06:05 +0000
commit8e9080bc533e6fe8602629ede8a2d866a1f7f1eb (patch)
tree5d995f900e5988c543e3cb57b412f7b26ceffdd1 /src/common/simple_string_dictionary.h
parentDon’t set exit_after_write to false for tvOS. (diff)
downloadbreakpad-8e9080bc533e6fe8602629ede8a2d866a1f7f1eb.tar.xz
Create LongStringDictionary and replace SimpleStringDictionary on iOS
This relands fd0a0d2b7ae9dd3d8a02b6a12e7941f7189fbb6c which was reverted in 5dad29423e62292c6ff468cabfee4422ba55b18b, with a fix for guarding kMaxSuffixLength which only used in assert()s with macros which breaks chromium.mac/ios-device. Change-Id: I5ee21b7f290517d6e7a0ef90b693b97f92392549 Reviewed-on: https://chromium-review.googlesource.com/751922 Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/simple_string_dictionary.h')
-rw-r--r--src/common/simple_string_dictionary.h6
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.