From 98d41a9af57cc3cba5045ad9ae36dab5219ef3a0 Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de> Date: Mon, 21 Aug 2023 14:10:49 +0200 Subject: [PATCH] adapt to new Pythia rndmPtr interface --- corsika/detail/modules/pythia8/Decay.inl | 3 +-- corsika/detail/modules/pythia8/Interaction.inl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/corsika/detail/modules/pythia8/Decay.inl b/corsika/detail/modules/pythia8/Decay.inl index 54cbf5a7d..2a71c1b97 100644 --- a/corsika/detail/modules/pythia8/Decay.inl +++ b/corsika/detail/modules/pythia8/Decay.inl @@ -33,8 +33,7 @@ namespace corsika::pythia8 { // run this only once during construction // link random number generator in pythia to CORSIKA8 - Pythia8::RndmEngine* rndm = new corsika::pythia8::Random(); - Pythia8::Pythia::setRndmEnginePtr(rndm); + Pythia8::Pythia::setRndmEnginePtr(std::make_shared<corsika::pythia8::Random>()); Pythia8::Pythia::readString("Next:numberShowInfo = 0"); Pythia8::Pythia::readString("Next:numberShowProcess = 0"); diff --git a/corsika/detail/modules/pythia8/Interaction.inl b/corsika/detail/modules/pythia8/Interaction.inl index 6dc08b99e..60c51efc2 100644 --- a/corsika/detail/modules/pythia8/Interaction.inl +++ b/corsika/detail/modules/pythia8/Interaction.inl @@ -33,7 +33,7 @@ namespace corsika::pythia8 { : print_listing_(print_listing) , pythiaMain_{CORSIKA_Pythia8_XML_DIR, false} , pythiaColl_{CORSIKA_Pythia8_XML_DIR, false} { - Pythia8::RndmEngine* rndm = new corsika::pythia8::Random(); + auto rndm = std::make_shared<corsika::pythia8::Random>(); pythiaColl_.setRndmEnginePtr(rndm); pythiaMain_.setRndmEnginePtr(rndm); -- GitLab