From 4ad345447384ae9327cab0977b95d0b67f8bde57 Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 13 Apr 2022 13:44:05 +0800 Subject: Simplify bias_ctx's constructor. --- main_simple_scanner.cpp | 2 +- viewport.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp index 5f59558..bcec163 100644 --- a/main_simple_scanner.cpp +++ b/main_simple_scanner.cpp @@ -21,7 +21,7 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport double r = 1.0 * image_width / image_height; basic_viewport8b vp{viewport_width, viewport_width / r, vec3d{0, 0, -focal_length}}; hitlist8b world; - bias_ctx bias{false, 0}; + bias_ctx bias{}; world.add_object(std::make_shared( vec3d{0, -100.5, -1}, 100)); // the earth diff --git a/viewport.h b/viewport.h index 72e938e..51159c9 100644 --- a/viewport.h +++ b/viewport.h @@ -27,7 +27,7 @@ class bias_ctx { public: bias_ctx() : enabled(false) {} - bias_ctx(bool enabled, uint64_t seed = 0UL) : enabled(enabled), mt(std::mt19937_64{seed}) {} + bias_ctx(uint64_t seed) : enabled(true), mt(std::mt19937_64{seed}) {} void operator()(double &bx, double &by) { if (enabled) { -- cgit v1.2.3