aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/msg.h')
-rw-r--r--include/salticidae/msg.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/salticidae/msg.h b/include/salticidae/msg.h
index 670d942..a81a5ae 100644
--- a/include/salticidae/msg.h
+++ b/include/salticidae/msg.h
@@ -172,7 +172,7 @@ class MsgBase {
throw std::runtime_error("payload not available");
no_payload = true;
#endif
- return std::move(payload);
+ return DataStream(std::move(payload));
}
void set_payload(DataStream &&s) {
@@ -203,7 +203,7 @@ class MsgBase {
<< "checksum=" << get_hex(checksum) << " "
#endif
<< "payload=" << get_hex(payload) << ">";
- return std::move(s);
+ return std::string(std::move(s));
}
#ifndef SALTICIDAE_NOCHECKSUM
@@ -239,7 +239,7 @@ class MsgBase {
<< htole(checksum)
#endif
<< payload;
- return std::move(s);
+ return bytearray_t(std::move(s));
}
void gen_hash_list(DataStream &s,