Rename random::random_device -> random::device
This commit is contained in:
parent
e2bcab4f89
commit
b6aa09bffe
4 changed files with 7 additions and 7 deletions
|
|
@ -678,7 +678,7 @@ struct animation_2d_app
|
|||
std::optional<std::size_t> selected;
|
||||
float selected_s = 0.f;
|
||||
|
||||
random::generator rng{random::random_device{}};
|
||||
random::generator rng{random::device{}};
|
||||
|
||||
async::threadpool bg{"bg"};
|
||||
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ struct cloud_app
|
|||
{
|
||||
async::threadpool bg("bg");
|
||||
|
||||
random::generator rng(random::random_device{});
|
||||
random::generator rng(random::device{});
|
||||
random::uniform_sphere_vector_distribution<float, 3> d;
|
||||
|
||||
std::vector<util::array<geom::vector<float, 3>, 3>> grad(4);
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ candle_renderer::candle_renderer()
|
|||
|
||||
void candle_renderer::add(geom::point<float, 3> const & pos, geom::vector<float, 3> const & dir, float size)
|
||||
{
|
||||
random::generator rng{random::random_device{}};
|
||||
random::generator rng{random::device{}};
|
||||
random::uniform_sphere_vector_distribution<float, 2> d;
|
||||
geom::vector<float, 2> noise_offset;
|
||||
while (true)
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
namespace psemek::random
|
||||
{
|
||||
|
||||
using random_device = boost::random_device;
|
||||
using device = boost::random_device;
|
||||
|
||||
// check that random_device::result_type is basically std::uint32_t
|
||||
static_assert(std::is_integral_v<random_device::result_type>);
|
||||
static_assert(std::is_unsigned_v<random_device::result_type>);
|
||||
static_assert(sizeof(random_device::result_type) == 4);
|
||||
static_assert(std::is_integral_v<device::result_type>);
|
||||
static_assert(std::is_unsigned_v<device::result_type>);
|
||||
static_assert(sizeof(device::result_type) == 4);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue