]> granicus.if.org Git - icinga2/commitdiff
ido: Fix const placement for arguments.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 9 Aug 2013 12:22:56 +0000 (14:22 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 9 Aug 2013 12:23:15 +0000 (14:23 +0200)
lib/ido/servicedbobject.cpp
lib/ido/servicedbobject.h

index 42eca6cc390a9fdeb1c51e8c35dfb6555f6691a0..9a85f3d3ed229d15b1850e020a5418e81f86bcf5 100644 (file)
@@ -317,7 +317,7 @@ void ServiceDbObject::CommentsChangedHandler(const Service::Ptr& svcfilter, cons
        }
 }
 
-void ServiceDbObject::AddComments(Service::Ptr const& service)
+void ServiceDbObject::AddComments(const Service::Ptr& service)
 {
        /* dump all comments */
        Dictionary::Ptr comments = service->GetComments();
@@ -334,7 +334,7 @@ void ServiceDbObject::AddComments(Service::Ptr const& service)
        }
 }
 
-void ServiceDbObject::AddComment(Service::Ptr const& service, Dictionary::Ptr const& comment)
+void ServiceDbObject::AddComment(const Service::Ptr& service, const Dictionary::Ptr& comment)
 {
        Host::Ptr host = service->GetHost();
 
@@ -358,7 +358,7 @@ void ServiceDbObject::AddComment(Service::Ptr const& service, Dictionary::Ptr co
        }
 }
 
-void ServiceDbObject::AddCommentByType(DynamicObject::Ptr const& object, Dictionary::Ptr const& comment)
+void ServiceDbObject::AddCommentByType(const DynamicObject::Ptr& object, const Dictionary::Ptr& comment)
 {
        unsigned long entry_time = static_cast<long>(comment->Get("entry_time"));
        unsigned long entry_time_usec = (comment->Get("entry_time") - entry_time) * 1000 * 1000;
@@ -402,7 +402,7 @@ void ServiceDbObject::AddCommentByType(DynamicObject::Ptr const& object, Diction
        OnQuery(query1);
 }
 
-void ServiceDbObject::DeleteComments(Service::Ptr const& service)
+void ServiceDbObject::DeleteComments(const Service::Ptr& service)
 {
        /* delete all comments associated for this host/service */
        Log(LogDebug, "ido", "delete comments for '" + service->GetName() + "'");
index 4d095ee3da187a81110174a09803270d3b6fe777..99b052d99f34960675a83834ab439e01a8e32d8a 100644 (file)
@@ -52,10 +52,10 @@ protected:
 
        static void CommentsChangedHandler(const Service::Ptr& service, const String& id, CommentChangedType type);
 
-       static void AddComments(Service::Ptr const& service);
-       static void AddComment(Service::Ptr const& service, Dictionary::Ptr const& comment);
-       static void AddCommentByType(DynamicObject::Ptr const& object, Dictionary::Ptr const& comment);
-       static void DeleteComments(Service::Ptr const& service);
+       static void AddComments(const Service::Ptr& service);
+       static void AddComment(const Service::Ptr& service, const Dictionary::Ptr& comment);
+       static void AddCommentByType(const DynamicObject::Ptr& object, const Dictionary::Ptr& comment);
+       static void DeleteComments(const Service::Ptr& service);
 };
 
 }