From 6a1ca34cf39533a803c2ded3422a5d952c49cf7f Mon Sep 17 00:00:00 2001 From: Viktor Gal Date: Wed, 8 May 2013 13:04:18 +0200 Subject: [PATCH] Random: Initialize class variables to NULL --- src/shogun/mathematics/Random.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/shogun/mathematics/Random.cpp b/src/shogun/mathematics/Random.cpp index dba09326f6b..e27b8775bae 100644 --- a/src/shogun/mathematics/Random.cpp +++ b/src/shogun/mathematics/Random.cpp @@ -14,13 +14,19 @@ using namespace shogun; CRandom::CRandom() - : m_seed(12345) + : m_seed(12345), + m_sfmt_32(NULL), + m_sfmt_64(NULL), + m_dsfmt(NULL) { init(); } CRandom::CRandom(uint32_t seed) - : m_seed(seed) + : m_seed(seed), + m_sfmt_32(NULL), + m_sfmt_64(NULL), + m_dsfmt(NULL) { init(); } @@ -89,7 +95,6 @@ void CRandom::fill_array(uint64_t* array, int32_t size) const } } - void CRandom::fill_array_oc(float64_t* array, int32_t size) const { if ((size >= dsfmt_get_min_array_size()) && (size % 2) == 0)