summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-07 13:45:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-07 14:21:16 +0100
commitfb6d3b883bfcd8de73d4426cc68ed6a7cc9e773a (patch)
treec136bf85c72aba4a8273c6e666775b4819c4c5cd /comphelper
parent75a23240d6ac090305f18ca93094ce2739eb8646 (diff)
disambiguate uniform_int_distribution
Change-Id: Ifa0c1b1983d1cc7f22d55b15dee88b7f709dbcf8
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/random.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index bcdd8e6c7198..4da4acb84d7a 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -60,23 +60,19 @@ int uniform_int_distribution(int a, int b)
}
// uniform ints [a,b] distribution
-unsigned int uniform_int_distribution(unsigned int a, unsigned int b)
+unsigned int uniform_uint_distribution(unsigned int a, unsigned int b)
{
boost::random::uniform_int_distribution<unsigned int> dist(a, b);
return dist(theRandomNumberGenerator::get().global_rng);
}
-#if SAL_TYPES_SIZEOFLONG == 8
-
// uniform size_t [a,b] distribution
-size_t uniform_int_distribution(size_t a, size_t b)
+size_t uniform_size_distribution(size_t a, size_t b)
{
boost::random::uniform_int_distribution<size_t> dist(a, b);
return dist(theRandomNumberGenerator::get().global_rng);
}
-#endif
-
// uniform size_t [a,b) distribution
double uniform_real_distribution(double a, double b)
{