Skip to content

Commit

Permalink
Random: Initialize class variables to NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed May 8, 2013
1 parent 3232bae commit 6a1ca34
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/shogun/mathematics/Random.cpp
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6a1ca34

Please sign in to comment.