- for (Table::iterator it = table.begin(); it != table.end(); ++it) {
- if (code == it->code && mod1 == it->mod.first && mod2 == it->mod.second) {
+ Table::iterator end = table.end();
+ for (Table::iterator it = table.begin(); it != end; ++it) {
+ if (*(code) == *(it->code)
+ && mod1 == it->mod.first
+ && mod2 == it->mod.second) {