From 7da1cfb07a0dfec08b861688640bbbb7779549f6 Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Fri, 25 Jun 2021 18:00:47 +0300 Subject: avoid searching std::map twice in innochecksum --- extra/innochecksum.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'extra') diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index beda56032b8..3eea1244429 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -912,12 +912,7 @@ parse_page( } /* update per-index statistics */ { - if (index_ids.count(id) == 0) { - index_ids[id] = per_index_stats(); - } - std::map::iterator it; - it = index_ids.find(id); - per_index_stats &index = (it->second); + per_index_stats &index = index_ids[id]; if (page_is_free(xdes, page_size, page_no)) { index.free_pages++; return; -- cgit v1.2.1