roscpp_core
roscpp_core copied to clipboard
Conversion from size_t to uint32_t in vector serialization
In roscpp_serialization/include/ros/serialization.h:417 v.size() returns with size_t and the serializedLength returns with uint32_t. size_t on 64-bit systems usually 64 bit wide, so this line cause a warning. (I noticed this on windows, where some warnings are enabled by default.)
The proper return type should be size_t, but since size_of(T) is already converted to uint32_t, this can be fixed with another static cast.
I can create a pull request if needed.