Move explicit instantiation of IncrementalMerkleTree::emptyroots into header

Fixes a -Wundefined-var-template warning with clang.
This commit is contained in:
Jack Grigg 2017-12-23 01:02:44 +00:00
parent 6c7930f688
commit 4fe053e6e8
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
2 changed files with 3 additions and 3 deletions

View File

@ -45,9 +45,6 @@ public:
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> PathFiller<Depth, Hash>::emptyroots;
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> IncrementalMerkleTree<Depth, Hash>::emptyroots;
template<size_t Depth, typename Hash>
void IncrementalMerkleTree<Depth, Hash>::wfcheck() const {
if (parents.size() >= Depth) {

View File

@ -216,6 +216,9 @@ public:
static SHA256Compress combine(const SHA256Compress& a, const SHA256Compress& b);
};
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> IncrementalMerkleTree<Depth, Hash>::emptyroots;
} // end namespace `libzcash`
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> ZCIncrementalMerkleTree;