| Index: snapshot/mac/mach_o_image_annotations_reader.cc
|
| diff --git a/snapshot/mac/mach_o_image_annotations_reader.cc b/snapshot/mac/mach_o_image_annotations_reader.cc
|
| index 4623aa63619544ad2c86764a7a648a17fd37b461..6c6831bdaea9b9616e4dca155e77f3e4fb37c1ab 100644
|
| --- a/snapshot/mac/mach_o_image_annotations_reader.cc
|
| +++ b/snapshot/mac/mach_o_image_annotations_reader.cc
|
| @@ -17,6 +17,8 @@
|
| #include <mach-o/loader.h>
|
| #include <mach/mach.h>
|
|
|
| +#include <utility>
|
| +
|
| #include "base/logging.h"
|
| #include "client/crashpad_info.h"
|
| #include "client/simple_string_dictionary.h"
|
| @@ -161,10 +163,7 @@ void MachOImageAnnotationsReader::ReadCrashpadSimpleAnnotations(
|
| if (key_length) {
|
| std::string key(entry.key, key_length);
|
| std::string value(entry.value, strnlen(entry.value, sizeof(entry.value)));
|
| - if (!simple_map_annotations->count(key)) {
|
| - simple_map_annotations->insert(
|
| - std::pair<std::string, std::string>(key, value));
|
| - } else {
|
| + if (!simple_map_annotations->insert(std::make_pair(key, value)).second) {
|
| LOG(INFO) << "duplicate simple annotation " << key << " in " << name_;
|
| }
|
| }
|
|
|