mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 06:18:02 +00:00
Merge pull request #2629 from wyager/master
Specified base_uint component size
This commit is contained in:
commit
8c6bbb3a86
@ -8,6 +8,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -20,14 +21,14 @@ inline int Testuint256AdHoc(std::vector<std::string> vArg);
|
|||||||
|
|
||||||
|
|
||||||
/** Base class without constructors for uint256 and uint160.
|
/** Base class without constructors for uint256 and uint160.
|
||||||
* This makes the compiler let u use it in a union.
|
* This makes the compiler let you use it in a union.
|
||||||
*/
|
*/
|
||||||
template<unsigned int BITS>
|
template<unsigned int BITS>
|
||||||
class base_uint
|
class base_uint
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum { WIDTH=BITS/32 };
|
enum { WIDTH=BITS/32 };
|
||||||
unsigned int pn[WIDTH];
|
uint32_t pn[WIDTH];
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool operator!() const
|
bool operator!() const
|
||||||
|
Loading…
Reference in New Issue
Block a user