Having some trouble getting Simutrans-Experimental 7.1 to compile in Linux (using Ansgar's automated nightly builds - the master branch on Github, rather than the devel branch). The latest error messages are as follows:
simconvoi.cc:2805: error: conversion from 'ware_t*' to non-scalar type 'slist_tpl<ware_t>::iterator' requested
simconvoi.cc:2806: error: conversion from 'ware_t*' to non-scalar type 'slist_tpl<ware_t>::iterator' requested
simconvoi.cc:2812: error: 'cl**** vector_tpl<ware_t>' has no member named 'insert'
in respect of the following code that compiles without error in Windows (MSVC++):
for(i=0; i<warenbauer_t::get_waren_anzahl(); i++ ) {
if(max_loaded_waren[i]>0 && i!=warenbauer_t::INDEX_NONE) {
ware_t ware(warenbauer_t::get_info(i));
ware.menge = max_loaded_waren[i];
if(ware.get_catg()==0) {
capacity.append( ware );
} else {
// append to category?
slist_tpl<ware_t>::iterator j = capacity.begin();
slist_tpl<ware_t>::iterator end = capacity.end();
while (j != end && j->get_catg() < ware.get_catg()) ++j;
if (j != end && j->get_catg() == ware.get_catg()) {
j->menge += max_loaded_waren[i];
} else {
// not yet there
capacity.insert(j, ware);
}
}
}
}
For reference, this line:
slist_tpl<ware_t>::iterator j = capacity.begin();
is line no. 2805. I do not understand how these errors relate to the code (both types are the same), and, at line 2812, "capacity" is an slist_tpl, not a vector, so the error makes no sense. I should be extremely grateful for any ****istance.