From fa456ccb2287b2a1a4eb7224b424f12fe59302e9 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 14 Apr 2022 19:34:33 +0200 Subject: Remove duplicate static_asserts One should be enough. Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space --- src/arith_uint256.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/arith_uint256.h') 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 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++) -- cgit v1.2.3