Construct an empty hash.
| 64 | |
| 65 | /// Construct an empty hash. |
| 66 | FixedHash() { m_data.fill(0); } |
| 67 | |
| 68 | /// Construct from another hash, filling with zeroes or cropping as necessary. |
| 69 | template <unsigned M> explicit FixedHash(FixedHash<M> const& _h, ConstructFromHashType _t = AlignLeft) { m_data.fill(0); unsigned c = std::min(M, N); for (unsigned i = 0; i < c; ++i) m_data[_t == AlignRight ? N - 1 - i : i] = _h[_t == AlignRight ? M - 1 - i : i]; } |