Make keys const.
Bug:
32619234
Test: m
Change-Id: I240341a0fec79754bea2ed21c0d0a4ddd119ce35
}
void WriteStringTable() {
- for (const std::pair<std::string, HprofStringId>& p : strings_) {
+ for (const auto& p : strings_) {
const std::string& string = p.first;
- const size_t id = p.second;
+ const HprofStringId id = p.second;
output_->StartNewRecord(HPROF_TAG_STRING, kHprofTime);
}
// Scan the map for the same value.
- for (const std::pair<uint32_t, uint32_t>& pair : search_map) {
+ for (const std::pair<const uint32_t, uint32_t>& pair : search_map) {
if (pair.first != src && pair.second == src_lock_levels) {
return true;
}