Project

General

Profile

Actions

Cleanup #432

closed

use STL find() and iterators instead of count()

Added by Sage Weil over 13 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

There are 100 million instances of code like

if (container.count(foo))
  return container[foo];

or similar. We should be using iterators so that the hashes/maps don't need to be traversed twice.
Actions

Also available in: Atom PDF