Skip to content

Commit

Permalink
Merge pull request EOSIO#66 from EOSIO/fix_datastream
Browse files Browse the repository at this point in the history
Resolves issue (Wrong datastream operator being called) EOSIO#65
  • Loading branch information
larryk85 authored Aug 30, 2018
2 parents 7d95ef9 + 660b3d8 commit d52a959
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libraries/eosiolib/datastream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class datastream<size_t> {
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const public_key pubkey) {
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const ::public_key pubkey) {
ds.write( (const char*)&pubkey, sizeof(pubkey));
return ds;
}
Expand All @@ -286,7 +286,7 @@ inline datastream<Stream>& operator<<(datastream<Stream>& ds, const public_key p
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator>>(datastream<Stream>& ds, public_key& pubkey) {
inline datastream<Stream>& operator>>(datastream<Stream>& ds, ::public_key& pubkey) {
ds.read((char*)&pubkey, sizeof(pubkey));
return ds;
}
Expand Down Expand Up @@ -362,7 +362,7 @@ inline datastream<Stream>& operator>>(datastream<Stream>& ds, bool& d) {
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum256& d) {
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const ::checksum256& d) {
ds.write( (const char*)&d.hash[0], sizeof(d.hash) );
return ds;
}
Expand All @@ -377,7 +377,7 @@ inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum256&
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator>>(datastream<Stream>& ds, checksum256& d) {
inline datastream<Stream>& operator>>(datastream<Stream>& ds, ::checksum256& d) {
ds.read((char*)&d.hash[0], sizeof(d.hash) );
return ds;
}
Expand Down Expand Up @@ -966,7 +966,7 @@ bytes pack( const T& value ) {
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum160& cs) {
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const ::checksum160& cs) {
ds.write((const char*)&cs.hash[0], sizeof(cs.hash));
return ds;
}
Expand All @@ -981,7 +981,7 @@ inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum160&
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator>>(datastream<Stream>& ds, checksum160& cs) {
inline datastream<Stream>& operator>>(datastream<Stream>& ds, ::checksum160& cs) {
ds.read((char*)&cs.hash[0], sizeof(cs.hash));
return ds;
}
Expand All @@ -996,7 +996,7 @@ inline datastream<Stream>& operator>>(datastream<Stream>& ds, checksum160& cs) {
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum512& cs) {
inline datastream<Stream>& operator<<(datastream<Stream>& ds, const ::checksum512& cs) {
ds.write((const char*)&cs.hash[0], sizeof(cs.hash));
return ds;
}
Expand All @@ -1011,7 +1011,7 @@ inline datastream<Stream>& operator<<(datastream<Stream>& ds, const checksum512&
* @return datastream<Stream>& - Reference to the datastream
*/
template<typename Stream>
inline datastream<Stream>& operator>>(datastream<Stream>& ds, checksum512& cs) {
inline datastream<Stream>& operator>>(datastream<Stream>& ds, ::checksum512& cs) {
ds.read((char*)&cs.hash[0], sizeof(cs.hash));
return ds;
}
Expand Down

0 comments on commit d52a959

Please sign in to comment.