From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/randomsystem.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/stable/randomsystem.cpp') diff --git a/src/stable/randomsystem.cpp b/src/stable/randomsystem.cpp index 0501587..68c69d5 100644 --- a/src/stable/randomsystem.cpp +++ b/src/stable/randomsystem.cpp @@ -2,39 +2,39 @@ #include "bu/file.h" Bu::RandomSystem::RandomSystem( Type eType ) : - eType( eType ), - pSrc( 0 ) + eType( eType ), + pSrc( 0 ) { - switch( eType ) - { - case Bu::RandomSystem::Fast: - pSrc = new Bu::File("/dev/urandom", Bu::File::Read ); - break; + switch( eType ) + { + case Bu::RandomSystem::Fast: + pSrc = new Bu::File("/dev/urandom", Bu::File::Read ); + break; - case Bu::RandomSystem::Good: - pSrc = new Bu::File("/dev/random", Bu::File::Read ); - break; - } + case Bu::RandomSystem::Good: + pSrc = new Bu::File("/dev/random", Bu::File::Read ); + break; + } } Bu::RandomSystem::~RandomSystem() { - delete pSrc; + delete pSrc; } void Bu::RandomSystem::seed( int32_t /*iSeed*/ ) { - // Seed really has no effect here... - // on linux, if we were root, we could write data to random/urandom to - // perturb the data, but it's not necesarry + // Seed really has no effect here... + // on linux, if we were root, we could write data to random/urandom to + // perturb the data, but it's not necesarry } int32_t Bu::RandomSystem::rand() { - if( !pSrc ) - throw Bu::ExceptionBase("Not initialized"); - int32_t i; - pSrc->read( &i, sizeof(int32_t) ); - return i; + if( !pSrc ) + throw Bu::ExceptionBase("Not initialized"); + int32_t i; + pSrc->read( &i, sizeof(int32_t) ); + return i; } -- cgit v1.2.3