Home | History | Annotate | Download | only in common

Lines Matching refs:MAP

8 #include <map>
14 // MAP is a map<uint??, ...> where the unsigned integer is
16 // Return the oldest entry in the map.
17 template<class MAP>
18 typename MAP::iterator ModMapOldest(MAP* map) {
19 typename MAP::iterator ret = map->begin();
20 if (ret != map->end()) {
21 typename MAP::key_type lower_quarter = 0;
25 typename MAP::iterator tmp = map->upper_bound(lower_quarter * 3);
26 if (tmp != map->end())
33 // MAP is a map<uint??, ...> where the unsigned integer is
35 // Returns the previous entry in the map.
36 template<class MAP>
37 typename MAP::iterator ModMapPrevious(MAP* map, typename MAP::iterator i) {
38 DCHECK(!map->empty());
39 typename MAP::iterator ret = i;
40 if (i == map->begin()) {
41 ret = map->end();
45 return map->end();
46 if ((i->first - ret->first) > ((typename MAP::key_type(0) - 1)) >> 1)
47 return map->end();