diff options
author | Jack Lloyd <[email protected]> | 2017-05-22 15:43:15 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-05-22 15:43:15 -0400 |
commit | 7728fbf8ebbac349bab487bda842cbd8c073848f (patch) | |
tree | e1cd1ae4464cbecfeca0b8483b1cd154dc5287a3 /src | |
parent | f2f2fe7610f196cd4c5f51b5e588558762448d3c (diff) |
Fix for old GCC and Clang
They don't understand unique_ptr<Derived> to unique_ptr<Base> without help
https://stackoverflow.com/questions/22018115/converting-stdunique-ptrderived-to-stdunique-ptrbase
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/hash/comb4p/comb4p.cpp | 2 | ||||
-rw-r--r-- | src/lib/hash/skein/skein_512.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/hash/comb4p/comb4p.cpp b/src/lib/hash/comb4p/comb4p.cpp index a6c40b801..f6c20f35e 100644 --- a/src/lib/hash/comb4p/comb4p.cpp +++ b/src/lib/hash/comb4p/comb4p.cpp @@ -74,7 +74,7 @@ std::unique_ptr<HashFunction> Comb4P::copy_state() const std::unique_ptr<Comb4P> copy(new Comb4P); copy->m_hash1 = m_hash1->copy_state(); copy->m_hash2 = m_hash2->copy_state(); - return copy; + return std::move(copy); } void Comb4P::add_data(const uint8_t input[], size_t length) diff --git a/src/lib/hash/skein/skein_512.cpp b/src/lib/hash/skein/skein_512.cpp index a3bbde9a7..eaa3090a4 100644 --- a/src/lib/hash/skein/skein_512.cpp +++ b/src/lib/hash/skein/skein_512.cpp @@ -47,7 +47,7 @@ std::unique_ptr<HashFunction> Skein_512::copy_state() const copy->m_buffer = this->m_buffer; copy->m_buf_pos = this->m_buf_pos; - return copy; + return std::move(copy); } void Skein_512::clear() |