aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-01 19:52:58 +0000
committerlloyd <[email protected]>2014-01-01 19:52:58 +0000
commit12be3939752cad5933bbdf67272ec929955cb308 (patch)
tree12e09ee398dfea3eee98b565bd27c1d7ccdb98be /src/utils
parent122e2ae12328c799fbb7f463055e1795ed4db367 (diff)
Include <cstdint> in types.h and include uintX_t in namespace, use for our typedefs
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/types.h35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/utils/types.h b/src/utils/types.h
index 5d746072c..f4a2eeacd 100644
--- a/src/utils/types.h
+++ b/src/utils/types.h
@@ -10,37 +10,26 @@
#include <botan/build.h>
#include <botan/assert.h>
-#include <stddef.h>
+#include <cstddef>
+#include <cstdint>
/**
* The primary namespace for the botan library
*/
namespace Botan {
-/**
-* Typedef representing an unsigned 8-bit quantity
-*/
-typedef unsigned char byte;
-
-/**
-* Typedef representing an unsigned 16-bit quantity
-*/
-typedef unsigned short u16bit;
-
-/**
-* Typedef representing an unsigned 32-bit quantity
-*/
-typedef unsigned int u32bit;
+using std::uint8_t;
+using std::uint16_t;
+using std::uint32_t;
+using std::uint64_t;
+using std::size_t;
-/**
-* Typedef representing a signed 32-bit quantity
-*/
-typedef signed int s32bit;
+typedef uint8_t byte;
+typedef uint16_t u16bit;
+typedef uint32_t u32bit;
+typedef uint64_t u64bit;
-/**
-* Typedef representing an unsigned 64-bit quantity
-*/
-typedef unsigned long long u64bit;
+typedef std::int32_t s32bit;
/**
* A default buffer size; typically a memory page