talosctl: 1.9.1 -> 1.9.2 (#374443)
[NixPkgs.git] / pkgs / by-name / sa / sacrifice / pythia83xx.patch
blobea162e30c9a8e95c5460a64c07ec482de3553672
1 diff --git a/include/Sacrifice/UserHooksFactory.hh b/include/Sacrifice/UserHooksFactory.hh
2 index 04b105b..19f2b4f 100644
3 --- a/include/Sacrifice/UserHooksFactory.hh
4 +++ b/include/Sacrifice/UserHooksFactory.hh
5 @@ -12,7 +12,7 @@
7 namespace Sacrifice{
9 - using Pythia8::UserHooks;
10 + using Pythia8::UserHooksPtr;
11 using std::string;
12 using std::map;
14 @@ -21,7 +21,7 @@ namespace Sacrifice{
16 public:
18 - static UserHooks* create(const string &hookName);
19 + static UserHooksPtr create(const string &hookName);
21 /**
22 * Loads a library of UserHooks
23 @@ -39,7 +39,7 @@ namespace Sacrifice{
25 class ICreator{
26 public:
27 - virtual UserHooks *create() const = 0;
28 + virtual UserHooksPtr create() const = 0;
29 virtual ~ICreator(){};
32 @@ -61,8 +61,8 @@ namespace Sacrifice{
36 - UserHooks *create()const{
37 - return new T;
38 + UserHooksPtr create()const{
39 + return std::make_shared<T>();
42 private:
43 diff --git a/src/UserHooksFactory.cxx b/src/UserHooksFactory.cxx
44 index 84a485b..5274119 100644
45 --- a/src/UserHooksFactory.cxx
46 +++ b/src/UserHooksFactory.cxx
47 @@ -11,7 +11,7 @@ namespace Sacrifice{
48 using std::ifstream;
50 //////////////////////////////////////////////////////////////////////////////
51 - UserHooks *UserHooksFactory::create(const string &name){
52 + UserHooksPtr UserHooksFactory::create(const string &name){
53 map<string, const ICreator*>::const_iterator it = s_creators().find(name);
54 if(it == s_creators().end()){
55 //eek!