You mean like this? (Sorry, not a C++ programmer)
Code: Select all
20 {^M
21 // compile all remaining and destroyed objects' ids^M
22 object_ids = combat_info.destroyed_object_ids;^M
23 for (ObjectMap::const_iterator<UniverseObject> it = combat_info.objects.const_begin();^M
24 it != combat_info.objects.const_end(); ++it)^M
25 { object_ids.insert(it->ID()); }^M
26 }^M
If yes the result is this:
Code: Select all
[ 8%] Building CXX object CMakeFiles/freeorioncommon.dir/combat/CombatLogManager.cpp.o
In file included from /root/FreeOrion/combat/CombatLogManager.cpp:1:
In file included from /root/FreeOrion/combat/CombatLogManager.h:5:
In file included from /root/FreeOrion/combat/CombatSystem.h:5:
In file included from /root/FreeOrion/combat/../universe/Universe.h:6:
/root/FreeOrion/combat/../universe/ObjectMap.h:143:72: error: no member named
'operator!=' in
'std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::map<int,
boost::shared_ptr<UniverseObject>, std::__1::less<int>,
std::__1::allocator<std::__1::pair<const int,
boost::shared_ptr<UniverseObject> > > >::__value_type,
std::__1::__tree_node<std::__1::map<int, boost::shared_ptr<UniverseObject>,
std::__1::less<int>, std::__1::allocator<std::__1::pair<const int,
boost::shared_ptr<UniverseObject> > > >::__value_type, void *> *, long> >'
{ return std::map<int, boost::shared_ptr<T> >::const_iterator::operator !=(o...
^
/root/FreeOrion/combat/CombatLogManager.cpp:24:13: note: in instantiation of member
function 'ObjectMap::const_iterator<UniverseObject>::operator!=' requested
here
it != combat_info.objects.const_end(); ++it)
^
In file included from /root/FreeOrion/combat/CombatLogManager.cpp:1:
In file included from /root/FreeOrion/combat/CombatLogManager.h:5:
In file included from /root/FreeOrion/combat/CombatSystem.h:5:
In file included from /root/FreeOrion/combat/../universe/Universe.h:6:
/root/FreeOrion/combat/../universe/ObjectMap.h:154:71: error: no member named
'operator==' in
'std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::map<int,
boost::shared_ptr<UniverseObject>, std::__1::less<int>,
std::__1::allocator<std::__1::pair<const int,
boost::shared_ptr<UniverseObject> > > >::__value_type,
std::__1::__tree_node<std::__1::map<int, boost::shared_ptr<UniverseObject>,
std::__1::less<int>, std::__1::allocator<std::__1::pair<const int,
boost::shared_ptr<UniverseObject> > > >::__value_type, void *> *, long> >'
if (std::map<int, boost::shared_ptr<T> >::const_iterator::operat...
^
/root/FreeOrion/combat/../universe/ObjectMap.h:117:13: note: in instantiation of
member function 'ObjectMap::const_iterator<UniverseObject>::Refresh' requested
here
Refresh();
^
/root/FreeOrion/combat/CombatLogManager.cpp:24:49: note: in instantiation of member
function 'ObjectMap::const_iterator<UniverseObject>::operator++' requested
here
it != combat_info.objects.const_end(); ++it)
^
2 errors generated.
So one of the errors is gone if I see this right.