-
Notifications
You must be signed in to change notification settings - Fork 290
updated abieos to the latest eosio-2.1.x branch #1122
base: develop-boxed
Are you sure you want to change the base?
Conversation
Passthrough return of main within start function of tester WASMs.
depricated methods
@heifner @huangminghuang please review |
@@ -170,7 +170,7 @@ inline partial_key make_key(T&& t) { | |||
return partial_key(convert_to_key(std::forward<T>(t))); | |||
} | |||
inline partial_key make_key(partial_key&& t) { | |||
return t; | |||
return std::move(t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as understand, you shouldn't use std::move(t)
here. You can check https://stackoverflow.com/questions/14856344/when-should-stdmove-be-used-on-a-function-return-value for explanations about when you should (or should not) use return std::move(...);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure about the purpose of this function. The old version of it creates a copy of t
. So I thought it will make more sense to make it move the content of t
.
GCC is complaining about it:
.../key_value.hpp:173:11: warning: local variable 't' will be copied despite being returned by name [-Wreturn-std-move]
return t;
^
.../key_value.hpp:173:11: note: call 'std::move' explicitly to avoid copying
return t;
^
std::move(t)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe move
is appropriate here.
I removed usage of
eosio::opaque::unpack()
as it was deprecated inabieos
.Change Description
API Changes
Documentation Additions