Hello.
Probably not really SFML related question, but Goggle did not helped me yet.
I need to send std::vector<sf::String> using sf::Packet.
Here is my code:
sf::Packet& operator<<(sf::Packet& packet, std::vector<sf::String>& vector)
{
packet << vector.size();
for (auto &i : vector) {
packet << i;
}
return packet;
}
Then sf::Packet << &std::Vector<sf::String> gives me this warning:
warning C4800: 'std::vector<sf::String,std::allocator<_Ty>> *':
forcing value to bool 'true' or 'false' (performance warning) with
[
_Ty=sf::String
]
I know what does it mean in some regular cases, however, I have no idea how to apply it to Vector.
UPD: I am dumb. I updated the function declaration with "vector&", so I need to use sf::Packet << std::Vector<sf::String> and not sf::Packet << &std::Vector<sf::String>.
However, I still would like to see an explantation about which internal errors were caused by my mistake.