Skip to content

Commit fa456cc

Browse files
author
MarcoFalke
committed
Remove duplicate static_asserts
One should be enough. Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
1 parent d0f7493 commit fa456cc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/arith_uint256.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,19 @@ template<unsigned int BITS>
2424
class base_uint
2525
{
2626
protected:
27+
static_assert(BITS / 32 > 0 && BITS % 32 == 0, "Template parameter BITS must be a positive multiple of 32.");
2728
static constexpr int WIDTH = BITS / 32;
2829
uint32_t pn[WIDTH];
2930
public:
3031

3132
base_uint()
3233
{
33-
static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
34-
3534
for (int i = 0; i < WIDTH; i++)
3635
pn[i] = 0;
3736
}
3837

3938
base_uint(const base_uint& b)
4039
{
41-
static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
42-
4340
for (int i = 0; i < WIDTH; i++)
4441
pn[i] = b.pn[i];
4542
}
@@ -53,8 +50,6 @@ class base_uint
5350

5451
base_uint(uint64_t b)
5552
{
56-
static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
57-
5853
pn[0] = (unsigned int)b;
5954
pn[1] = (unsigned int)(b >> 32);
6055
for (int i = 2; i < WIDTH; i++)

0 commit comments

Comments
 (0)