mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Remove duplicate static_asserts
One should be enough. Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
This commit is contained in:
parent
d0f7493b6c
commit
fa456ccb22
1 changed files with 1 additions and 6 deletions
|
@ -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++)
|
||||
|
|
Loading…
Add table
Reference in a new issue