Linux compile error: rev 1184
Posted: Sun Apr 05, 2015 2:42 pm
It's not liking the mashup of const char and string. Googled around a bit and saw that how to do it is exactly how Xinux did it, but Linux is complaining.
Anyone?
Note to Xinux:
Not sure what's going on here while looking this over:
I thought we were removing ' ' space, not double-quotes?
And also, we shouldn't need std:: in front of string, since string and other dependencies are referenced. But that isn't the issue, just standards.
Code: Select all
Net.cpp: In member function ‘void Net::HandleChatJoinRequest(std::shared_ptr<Client>&, std::shared_ptr<WorldCharacter>&, const char*)’:
Net.cpp:1036:69: error: cannot convert ‘std::basic_string<char>::iterator {aka __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >}’ to ‘const char*’ for argument ‘1’ to ‘int remove(const char*)’
chan_name.erase(std::remove(chan_name.begin(), chan_name.end(), '"'), chan_name.end());
^
Net.cpp: In member function ‘void Net::HandleClientGuildRenameRank(std::shared_ptr<Client>&, PacketStruct*)’:
Net.cpp:1440:11: warning: unused variable ‘unknown1’ [-Wunused-variable]
uint32_t unknown1 = packet->GetUInt32("unknown1");
^
make: *** [Net.o] Error 1
Note to Xinux:
Not sure what's going on here while looking this over:
Code: Select all
remove(chan_name.begin(), chan_name.end(), '"')
And also, we shouldn't need std:: in front of string, since string and other dependencies are referenced. But that isn't the issue, just standards.