From d46ec3f9b9abe08bbf77502e2efbf84b75ab6ce6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 15 Apr 2020 20:41:38 +0200 Subject: [PATCH] fix init ordering of members --- test/unit/RandomNumberGeneration.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/unit/RandomNumberGeneration.h b/test/unit/RandomNumberGeneration.h index befa21aaa..ed7bda55e 100644 --- a/test/unit/RandomNumberGeneration.h +++ b/test/unit/RandomNumberGeneration.h @@ -5,8 +5,6 @@ Open Asset Import Library (assimp) Copyright (c) 2006-2020, assimp team - - All rights reserved. Redistribution and use of this software in source and binary forms, @@ -54,10 +52,17 @@ template class RandomUniformRealGenerator { public: RandomUniformRealGenerator() : - rd_(), re_(rd_()), dist_() { + dist_(), + rd_(), + re_(rd_()), { + // empty } + RandomUniformRealGenerator(T min, T max) : - rd_(), re_(rd_()), dist_(min, max) { + dist_(min, max), + rd_(), + re_(rd_()), { + // empty } inline T next() { @@ -65,10 +70,9 @@ public: } private: - std::uniform_real_distribution dist_; - std::default_random_engine re_; std::random_device rd_; + std::default_random_engine re_; }; using RandomUniformFloatGenerator = RandomUniformRealGenerator;