merged fixes from release branch

This commit is contained in:
Arvid Norberg 2005-11-02 23:24:18 +00:00
parent cf4e3211ec
commit e5f73f4563
1 changed files with 5 additions and 5 deletions

View File

@ -175,10 +175,10 @@ namespace
, map_entry("pX", "pHoeniX")
};
bool compare_first_string(map_entry const& e, char const* str)
bool compare_first_string(map_entry const& lhs, map_entry const& rhs)
{
return e.first[0] < str[0]
|| ((e.first[0] == str[0]) && (e.first[1] < str[1]));
return lhs.first[0] < rhs.first[0]
|| ((lhs.first[0] == rhs.first[0]) && (lhs.first[1] < rhs.first[1]));
}
std::string lookup(fingerprint const& f)
@ -188,13 +188,13 @@ namespace
const int size = sizeof(name_map)/sizeof(name_map[0]);
map_entry* i =
std::lower_bound(name_map, name_map + size
, f.id, &compare_first_string);
, map_entry(f.id, ""), &compare_first_string);
#ifndef NDEBUG
for (int i = 1; i < size; ++i)
{
assert(compare_first_string(name_map[i-1]
, name_map[i].first));
, name_map[i]));
}
#endif