nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/include/Sacrifice/UserHooksFactory.hh b/include/Sacrifice/UserHooksFactory.hh
2index 04b105b..19f2b4f 100644
3--- a/include/Sacrifice/UserHooksFactory.hh
4+++ b/include/Sacrifice/UserHooksFactory.hh
5@@ -12,7 +12,7 @@
6
7 namespace Sacrifice{
8
9- using Pythia8::UserHooks;
10+ using Pythia8::UserHooksPtr;
11 using std::string;
12 using std::map;
13
14@@ -21,7 +21,7 @@ namespace Sacrifice{
15
16 public:
17
18- static UserHooks* create(const string &hookName);
19+ static UserHooksPtr create(const string &hookName);
20
21 /**
22 * Loads a library of UserHooks
23@@ -39,7 +39,7 @@ namespace Sacrifice{
24
25 class ICreator{
26 public:
27- virtual UserHooks *create() const = 0;
28+ virtual UserHooksPtr create() const = 0;
29 virtual ~ICreator(){};
30 };
31
32@@ -61,8 +61,8 @@ namespace Sacrifice{
33 }
34 }
35
36- UserHooks *create()const{
37- return new T;
38+ UserHooksPtr create()const{
39+ return std::make_shared<T>();
40 }
41
42 private:
43diff --git a/src/UserHooksFactory.cxx b/src/UserHooksFactory.cxx
44index 84a485b..5274119 100644
45--- a/src/UserHooksFactory.cxx
46+++ b/src/UserHooksFactory.cxx
47@@ -11,7 +11,7 @@ namespace Sacrifice{
48 using std::ifstream;
49
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!