Skip to content
Snippets Groups Projects
Commit 541b3dfc authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

Use fixed-width integer types (C++11)

Use the fixed-width integer types introduced in C++11 instead of
making assumptions on the size of integers. The following changes were
implemented:

unsigned short used to store the bigunsignedint:
  Changed type to uint16_t. The implementation requires this to be a
  16-bit type.

int, unsigned int used to store intermediates:
  Changed type to (u)int_fast32_t. This is enough to hold sums, products
  or differences of two uint16_t integers.

std::size_t used as parameter in constructor and arithmetic operators:
  Changed type to uintmax_t. Any unsigned integer type should be usable
  in conjunction with bigunsignedint.

Return value of touint() member function:
  Changed type to uint_least32_t. The current implementation only
  returns the last two "digits" (of 16 bits each).
parent abbffdcb
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment