Commit 7da1cfb0 authored by Eugene Kosov's avatar Eugene Kosov

avoid searching std::map twice in innochecksum

parent 1918bdf3
......@@ -912,12 +912,7 @@ parse_page(
}
/* update per-index statistics */
{
if (index_ids.count(id) == 0) {
index_ids[id] = per_index_stats();
}
std::map<unsigned long long, per_index_stats>::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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment