aboutsummaryrefslogtreecommitdiff
path: root/src/msg.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-04 22:17:17 -0400
committerDeterminant <[email protected]>2019-06-04 22:17:17 -0400
commitdab48a1825aed9c810ce83ea8054fa435ecb41be (patch)
treee0a3f9587e3606350dedb291a22a70a9ba5b7e44 /src/msg.cpp
parentda42ddf96c78a73b4cf5f8854e98e009f4f174a4 (diff)
...
Diffstat (limited to 'src/msg.cpp')
-rw-r--r--src/msg.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/msg.cpp b/src/msg.cpp
index d395d2b..caee1c7 100644
--- a/src/msg.cpp
+++ b/src/msg.cpp
@@ -1,11 +1,13 @@
+#include "salticidae/config.h"
#ifdef SALTICIDAE_CBINDINGS
#include "salticidae/msg.h"
extern "C" {
msg_t *msg_new(_opcode_t opcode, bytearray_t *_moved_payload) {
- auto res = new msg_t(opcode, *payload);
- bytearray_free(payload);
+ auto res = new msg_t(opcode, std::move(*_moved_payload));
+ bytearray_free(_moved_payload);
+ return res;
}
datastream_t *msg_get_payload(const msg_t *msg) {