blob: 62c3055360374ee8200620b6dc63e5609721d664 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* Copyright (c) 2012 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <Swiften/Base/BoostRandomGenerator.h>
#include <numeric>
#include <boost/random/uniform_int.hpp>
#include <boost/random/variate_generator.hpp>
namespace Swift {
int BoostRandomGenerator::generateRandomInteger(int maximum) {
boost::uniform_int<> distribution(0, maximum);
return distribution(generator);
}
}
|