aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-03-26 10:02:45 -0400
committerJack Lloyd <[email protected]>2019-03-26 10:02:45 -0400
commitd9026650285523ca82e98066d507dbb39240f278 (patch)
tree32dec8aabe949d15f8efac876dec0738e699676e /src/lib/hash
parent9ad6f1bd3046aba8fd014044819510f53290d02e (diff)
Work around problem with GCC 4.8
Diffstat (limited to 'src/lib/hash')
-rw-r--r--src/lib/hash/comb4p/comb4p.cpp3
-rw-r--r--src/lib/hash/skein/skein_512.cpp3
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()