Skip to content

Commit 578a4c7

Browse files
committed
Fixed cstring: No such file or directory issue"
1 parent 8721e18 commit 578a4c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ros/msg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#include <stdint.h>
3939
#include <stddef.h>
40-
#include <cstring>
40+
#include <string.h>
4141

4242
namespace ros
4343
{
@@ -65,7 +65,7 @@ class Msg
6565
static int serializeAvrFloat64(unsigned char* outbuffer, const float f)
6666
{
6767
int32_t val;
68-
std::memcpy(&val, &f, sizeof(val));
68+
memcpy(&val, &f, sizeof(val));
6969

7070
int16_t exp = ((val >> 23) & 255);
7171
uint32_t mantissa = val & 0x7FFFFF;
@@ -179,7 +179,7 @@ class Msg
179179
// Copy negative sign.
180180
val |= (static_cast<uint32_t>(*(inbuffer++)) & 0x80) << 24;
181181

182-
std::memcpy(f, &val, sizeof(val));
182+
memcpy(f, &val, sizeof(val));
183183
return 8;
184184
}
185185

0 commit comments

Comments
 (0)