aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/stream.h
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2019-10-14 13:36:58 -0400
committerDeterminant <tederminant@gmail.com>2019-10-14 13:36:58 -0400
commit2a99baafdcac46931b00a9ef9e77340dbc319b58 (patch)
tree99bd05cd8985ee61e93332c626d40cb9ea5f1fb1 /include/salticidae/stream.h
parentb6cc8b6615266fa1023b63d08e96971629d854c6 (diff)
remove unnecessary std::move()v0.1.0
Diffstat (limited to 'include/salticidae/stream.h')
-rw-r--r--include/salticidae/stream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/salticidae/stream.h b/include/salticidae/stream.h
index 251e3f7..fb951cb 100644
--- a/include/salticidae/stream.h
+++ b/include/salticidae/stream.h
@@ -188,7 +188,7 @@ class DataStream {
}
operator bytearray_t () && {
- return std::move(buffer);
+ return buffer;
}
operator std::string () const & {
@@ -224,7 +224,7 @@ class Serializable {
bytearray_t to_bytes() const {
DataStream s;
s << *this;
- return std::move(s);
+ return bytearray_t(std::move(s));
}
inline std::string to_hex() const;
@@ -310,7 +310,7 @@ class Blob: public Serializable {
operator bytearray_t () const & {
DataStream s;
s << *this;
- return std::move(s);
+ return bytearray_t(std::move(s));
}
};
@@ -393,7 +393,7 @@ class _Bits {
operator bytearray_t () const & {
DataStream s;
s << *this;
- return std::move(s);
+ return bytearray_t(std::move(s));
}
uint8_t get(uint32_t idx) const {
@@ -453,7 +453,7 @@ template<typename T> inline std::string get_hex(const T &x) {
inline bytearray_t from_hex(const std::string &hex_str) {
DataStream s;
s.load_hex(hex_str);
- return std::move(s);
+ return bytearray_t(std::move(s));
}
inline std::string Serializable::to_hex() const { return get_hex(*this); }