Skip to content
Snippets Groups Projects
Commit b4842d76 authored by Benjamin Maison's avatar Benjamin Maison
Browse files

replaced the included file cstring by string.h

parent 60ff49ac
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include <cstring> #include <string.h>
namespace ros namespace ros
{ {
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
static int serializeAvrFloat64(unsigned char* outbuffer, const float f) static int serializeAvrFloat64(unsigned char* outbuffer, const float f)
{ {
int32_t val; int32_t val;
std::memcpy(&val, &f, sizeof(val)); memcpy(&val, &f, sizeof(val));
int16_t exp = ((val >> 23) & 255); int16_t exp = ((val >> 23) & 255);
uint32_t mantissa = val & 0x7FFFFF; uint32_t mantissa = val & 0x7FFFFF;
...@@ -179,7 +179,7 @@ public: ...@@ -179,7 +179,7 @@ public:
// Copy negative sign. // Copy negative sign.
val |= (static_cast<uint32_t>(*(inbuffer++)) & 0x80) << 24; val |= (static_cast<uint32_t>(*(inbuffer++)) & 0x80) << 24;
std::memcpy(f, &val, sizeof(val)); memcpy(f, &val, sizeof(val));
return 8; return 8;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment