Fix a compiler warning about an uninitialized variable. Basically, we
used to insert uninitialized values into a std::multimap and then fix
them later. Rather than doing that, just insert the value we want
directly into the map.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
decode(n, p);
m.clear();
while (n--) {
- T k;
- decode(k, p);
- typename std::multimap<T,U>::iterator it;
- U u;
- it = m.insert(std::pair<T,U>(k, u));
- decode(it->second, p);
+ typename std::pair<T,U> val;
+ decode(val.first, p);
+ decode(val.second, p);
+ m.insert(val);
}
}