SUPERNOVA: Initializes RandomSource on stack

This commit is contained in:
Joseph-Eugene Winzer 2018-01-08 00:58:18 +01:00 committed by Thierry Crozat
parent b937268e61
commit dd6df76b32
2 changed files with 2 additions and 4 deletions

View file

@ -103,6 +103,7 @@ SupernovaEngine::SupernovaEngine(OSystem *syst)
, _currentImage(NULL)
, _soundMusicIntro(NULL)
, _soundMusicOutro(NULL)
, _rnd("supernova")
, _brightness(255)
, _menuBrightness(255)
, _delay(33)
@ -121,15 +122,12 @@ SupernovaEngine::SupernovaEngine(OSystem *syst)
// setup engine specific debug channels
DebugMan.addDebugChannel(kDebugGeneral, "general", "Supernova general debug channel");
_rnd = new Common::RandomSource("supernova");
}
SupernovaEngine::~SupernovaEngine() {
DebugMan.clearAllDebugChannels();
delete _currentImage;
delete _rnd;
delete _console;
delete _gm;
delete _soundMusicIntro;

View file

@ -97,7 +97,7 @@ public:
virtual Common::Error run();
Common::RandomSource *_rnd;
Common::RandomSource _rnd;
GameManager *_gm;
Console *_console;
Audio::SoundHandle _soundHandle;