summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2018-11-30 18:02:01 +0100
committerAlbert Astals Cid <tsdgeos@yahoo.es>2018-12-06 17:31:41 +0000
commit51bb46766cc5b50d81227cd91e518bc78b0a944b (patch)
tree9a36edec79f6a18547b8b6ecb1146c440780883d /goo
parent27954f7d44275d4fc458da680bba89ab749d3c07 (diff)
Replace Guchar by unsigned char
Diffstat (limited to 'goo')
-rw-r--r--goo/grandom.cc4
-rw-r--r--goo/grandom.h2
-rw-r--r--goo/gtypes.h1
3 files changed, 3 insertions, 4 deletions
diff --git a/goo/grandom.cc b/goo/grandom.cc
index 62d11c17..9f6834af 100644
--- a/goo/grandom.cc
+++ b/goo/grandom.cc
@@ -24,10 +24,10 @@ auto& grandom_engine()
}
-void grandom_fill(Guchar *buff, int size)
+void grandom_fill(unsigned char *buff, int size)
{
auto& engine = grandom_engine();
- std::uniform_int_distribution<unsigned short> distribution{std::numeric_limits<Guchar>::min(), std::numeric_limits<Guchar>::max()};
+ std::uniform_int_distribution<unsigned short> distribution{std::numeric_limits<unsigned char>::min(), std::numeric_limits<unsigned char>::max()};
for (int index = 0; index < size; ++index) {
buff[index] = distribution(engine);
}
diff --git a/goo/grandom.h b/goo/grandom.h
index 63bca38f..eccb972f 100644
--- a/goo/grandom.h
+++ b/goo/grandom.h
@@ -15,7 +15,7 @@
#include "gtypes.h"
/// Fills the given buffer with random bytes
-void grandom_fill(Guchar *buff, int size);
+void grandom_fill(unsigned char *buff, int size);
/// Returns a random number in [0,1)
double grandom_double();
diff --git a/goo/gtypes.h b/goo/gtypes.h
index 10fdf82d..f7567bcb 100644
--- a/goo/gtypes.h
+++ b/goo/gtypes.h
@@ -31,7 +31,6 @@
* These have stupid names to avoid conflicts with <sys/types.h>,
* which on various systems defines some random subset of these.
*/
-typedef unsigned char Guchar;
typedef unsigned short Gushort;
typedef unsigned int Guint;
typedef unsigned long Gulong;