From 7728fbf8ebbac349bab487bda842cbd8c073848f Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 22 May 2017 15:43:15 -0400 Subject: Fix for old GCC and Clang They don't understand unique_ptr to unique_ptr without help https://stackoverflow.com/questions/22018115/converting-stdunique-ptrderived-to-stdunique-ptrbase --- src/lib/hash/comb4p/comb4p.cpp | 2 +- src/lib/hash/skein/skein_512.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/hash') 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 Comb4P::copy_state() const std::unique_ptr 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 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() -- cgit v1.2.3