Ok, Cavedude brought to my attention that this will not compile on Linux.
Since I can't test on a Linux system, I was wondering if someone with knowledge could give me a pointer as to what isn't right about this.
Code:
Corpse::Corpse(Client* client, sint32 in_rezexp)
{...
std::list<uint32> removed_list;
...
removed_list.merge(MoveItemToCorpse(client, item, i));
...
removed_list.merge(MoveItemToCorpse(client, item, i));
...}
std::list<uint32> Corpse::MoveItemToCorpse(Client *client, ItemInst *item, sint16 equipslot)
{...
std::list<uint32> returnlist;
...
return returnlist;
}
Obviously, the first function calls the second one for the return list to merge.
Problem is, the compiler is kicking back a 'no matching function for call to std::list<unsigned int>::merge(std::list<unsigned int>)' for both merge calls.
Removed_list is not used between its definition and the first merge call.
I did change the return type for 'MoveItemToCorpse' in the header file..and it does compile and work correctly in windows.
Could it be one of these? (Or something else entirely?)
- Lack of an '#include' or 'using namespace' in the *.h file (because of return type change from uint32)
- The 'removed_list' is defined, but not initiated
- A 'list.merge()' argument can't be a function even though the return type is valid
I am googling this...