diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index aab0e9fb..9aef25ec 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -4983,12 +4983,9 @@ void MinidumpCrashpadInfo::Print() { MDGUIDToString(crashpad_info_.report_id).c_str()); printf(" client_id = %s\n", MDGUIDToString(crashpad_info_.client_id).c_str()); - for (std::map::const_iterator iterator = - simple_annotations_.begin(); - iterator != simple_annotations_.end(); - ++iterator) { - printf(" simple_annotations[\"%s\"] = %s\n", - iterator->first.c_str(), iterator->second.c_str()); + for (const auto& annot : simple_annotations_) { + printf(" simple_annotations[\"%s\"] = %s\n", annot.first.c_str(), + annot.second.c_str()); } for (uint32_t module_index = 0; module_index < module_crashpad_info_links_.size(); @@ -4997,23 +4994,18 @@ void MinidumpCrashpadInfo::Print() { module_index, module_crashpad_info_links_[module_index]); printf(" module_list[%d].version = %d\n", module_index, module_crashpad_info_[module_index].version); - for (uint32_t annotation_index = 0; - annotation_index < - module_crashpad_info_list_annotations_[module_index].size(); + const auto& list_annots = + module_crashpad_info_list_annotations_[module_index]; + for (uint32_t annotation_index = 0; annotation_index < list_annots.size(); ++annotation_index) { - printf(" module_list[%d].list_annotations[%d] = %s\n", - module_index, - annotation_index, - module_crashpad_info_list_annotations_ - [module_index][annotation_index].c_str()); + printf(" module_list[%d].list_annotations[%d] = %s\n", module_index, + annotation_index, list_annots[annotation_index].c_str()); } - for (std::map::const_iterator iterator = - module_crashpad_info_simple_annotations_[module_index].begin(); - iterator != - module_crashpad_info_simple_annotations_[module_index].end(); - ++iterator) { + const auto& simple_annots = + module_crashpad_info_simple_annotations_[module_index]; + for (const auto& annot : simple_annots) { printf(" module_list[%d].simple_annotations[\"%s\"] = %s\n", - module_index, iterator->first.c_str(), iterator->second.c_str()); + module_index, annot.first.c_str(), annot.second.c_str()); } }