summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/service/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse-api/service/main.cpp')
-rw-r--r--gentoobrowse-api/service/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gentoobrowse-api/service/main.cpp b/gentoobrowse-api/service/main.cpp
index 3221e4c..e14c2a0 100644
--- a/gentoobrowse-api/service/main.cpp
+++ b/gentoobrowse-api/service/main.cpp
@@ -1,4 +1,4 @@
-#include <Ice/Communicator.h>
+#include <Ice/Initialize.h>
#include <Ice/ObjectAdapter.h>
#include <icetrayService.h>
#include "portageimpl.h"
@@ -32,11 +32,11 @@ class Api : public IceTray::Service {
void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override
{
auto db = getConnectionPool(ic, "postgresql", "GentooBrowseAPI");
- adp->add(new Portage(db), ic->stringToIdentity("portage"));
- adp->add(new Maintenance(db, ic, ic->getProperties()), ic->stringToIdentity("maintenance"));
- adp->add(new Users(db), ic->stringToIdentity("users"));
- adp->add(new Notifications(), ic->stringToIdentity("notifications"));
- adp->add(new MailServer(), ic->stringToIdentity("mailserver"));
+ adp->add(std::make_shared<Portage>(db), Ice::stringToIdentity("portage"));
+ adp->add(std::make_shared<Maintenance>(db, ic, ic->getProperties()), Ice::stringToIdentity("maintenance"));
+ adp->add(std::make_shared<Users>(db), Ice::stringToIdentity("users"));
+ adp->add(std::make_shared<Notifications>(), Ice::stringToIdentity("notifications"));
+ adp->add(std::make_shared<MailServer>(), Ice::stringToIdentity("mailserver"));
}
};