diff options
| author | practicalswift <[email protected]> | 2017-08-16 21:22:56 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-08-17 00:42:32 +0200 |
| commit | d1e6f91f85ba81394297ba72271226ece7047303 (patch) | |
| tree | 216f74b95682ab69fe499940a81b2bdbf2b16a27 /src | |
| parent | Merge #10901: Fix constness of ArgsManager methods (diff) | |
| download | discoin-d1e6f91f85ba81394297ba72271226ece7047303.tar.xz discoin-d1e6f91f85ba81394297ba72271226ece7047303.zip | |
Prefer compile-time checking over run-time checking
Diffstat (limited to 'src')
| -rw-r--r-- | src/arith_uint256.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arith_uint256.h b/src/arith_uint256.h index 6223e4afe..5fd4fe96c 100644 --- a/src/arith_uint256.h +++ b/src/arith_uint256.h @@ -250,7 +250,7 @@ public: uint64_t GetLow64() const { - assert(WIDTH >= 2); + static_assert(WIDTH >= 2, "Assertion WIDTH >= 2 failed (WIDTH = BITS / 32). BITS is a template parameter."); return pn[0] | (uint64_t)pn[1] << 32; } }; |