diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-04-14 19:34:33 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-04-14 19:26:22 +0200 |
commit | fa456ccb2287b2a1a4eb7224b424f12fe59302e9 (patch) | |
tree | 8bd9ddfbb64f5749c6e0e55f17c4fe0bba22871c /src/arith_uint256.h | |
parent | d0f7493b6c804c04407fecfdfad3d7489fdcf30c (diff) |
Remove duplicate static_asserts
One should be enough. Can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
Diffstat (limited to 'src/arith_uint256.h')
-rw-r--r-- | src/arith_uint256.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/arith_uint256.h b/src/arith_uint256.h index 19193972a4..b7b3b3a285 100644 --- a/src/arith_uint256.h +++ b/src/arith_uint256.h @@ -24,22 +24,19 @@ template<unsigned int BITS> class base_uint { protected: + static_assert(BITS / 32 > 0 && BITS % 32 == 0, "Template parameter BITS must be a positive multiple of 32."); static constexpr int WIDTH = BITS / 32; uint32_t pn[WIDTH]; public: base_uint() { - static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32."); - for (int i = 0; i < WIDTH; i++) pn[i] = 0; } base_uint(const base_uint& b) { - static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32."); - for (int i = 0; i < WIDTH; i++) pn[i] = b.pn[i]; } @@ -53,8 +50,6 @@ public: base_uint(uint64_t b) { - static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32."); - pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); for (int i = 2; i < WIDTH; i++) |