diff options
author | Jack Lloyd <[email protected]> | 2019-03-26 10:02:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-03-26 10:02:45 -0400 |
commit | d9026650285523ca82e98066d507dbb39240f278 (patch) | |
tree | 32dec8aabe949d15f8efac876dec0738e699676e /src | |
parent | 9ad6f1bd3046aba8fd014044819510f53290d02e (diff) |
Work around problem with GCC 4.8
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/hash/comb4p/comb4p.cpp | 3 | ||||
-rw-r--r-- | src/lib/hash/skein/skein_512.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/hash/comb4p/comb4p.cpp b/src/lib/hash/comb4p/comb4p.cpp index a6c40b801..419e00df5 100644 --- a/src/lib/hash/comb4p/comb4p.cpp +++ b/src/lib/hash/comb4p/comb4p.cpp @@ -74,7 +74,8 @@ 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; + // work around GCC 4.8 bug + return std::unique_ptr<HashFunction>(copy.release()); } 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 87dee24ba..67b02e5c1 100644 --- a/src/lib/hash/skein/skein_512.cpp +++ b/src/lib/hash/skein/skein_512.cpp @@ -46,7 +46,8 @@ 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; + // work around GCC 4.8 bug + return std::unique_ptr<HashFunction>(copy.release()); } void Skein_512::clear() |