[icinga-checkins] icinga.org: icinga2/master: Remove unused code in the IDO classes

git at icinga.org git at icinga.org
Sun Aug 14 22:30:28 CEST 2016


Module: icinga2
Branch: master
Commit: 980ba4282547f07b2de91af75cab5ed622d86ac1
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=980ba4282547f07b2de91af75cab5ed622d86ac1

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Sun Aug 14 22:20:31 2016 +0200

Remove unused code in the IDO classes

fixes #12434

---

 lib/db_ido/commanddbobject.cpp      |    7 +------
 lib/db_ido/commanddbobject.hpp      |    3 ---
 lib/db_ido/dbobject.cpp             |    5 -----
 lib/db_ido/dbobject.hpp             |    2 --
 lib/db_ido/hostgroupdbobject.cpp    |    2 +-
 lib/db_ido/servicedbobject.cpp      |    5 -----
 lib/db_ido/servicedbobject.hpp      |    2 --
 lib/db_ido/servicegroupdbobject.cpp |    2 +-
 lib/db_ido/userdbobject.cpp         |    5 -----
 lib/db_ido/userdbobject.hpp         |    2 --
 lib/db_ido/usergroupdbobject.cpp    |    2 +-
 11 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/lib/db_ido/commanddbobject.cpp b/lib/db_ido/commanddbobject.cpp
index 6620c83..391ce89 100644
--- a/lib/db_ido/commanddbobject.cpp
+++ b/lib/db_ido/commanddbobject.cpp
@@ -46,10 +46,5 @@ Dictionary::Ptr CommandDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr CommandDbObject::GetStatusFields(void) const
 {
-	return Empty;
-}
-
-void CommandDbObject::OnConfigUpdate(void)
-{
-	return;
+	return Dictionary::Ptr();
 }
diff --git a/lib/db_ido/commanddbobject.hpp b/lib/db_ido/commanddbobject.hpp
index 4c7d50a..5fa3a5f 100644
--- a/lib/db_ido/commanddbobject.hpp
+++ b/lib/db_ido/commanddbobject.hpp
@@ -40,9 +40,6 @@ public:
 
 	virtual Dictionary::Ptr GetConfigFields(void) const override;
 	virtual Dictionary::Ptr GetStatusFields(void) const override;
-
-protected:
-	virtual void OnConfigUpdate(void) override;
 };
 
 }
diff --git a/lib/db_ido/dbobject.cpp b/lib/db_ido/dbobject.cpp
index 471bd42..de7c92c 100644
--- a/lib/db_ido/dbobject.cpp
+++ b/lib/db_ido/dbobject.cpp
@@ -269,11 +269,6 @@ double DbObject::GetLastStatusUpdate(void) const
 	return m_LastStatusUpdate;
 }
 
-bool DbObject::IsStatusAttribute(const String&) const
-{
-	return false;
-}
-
 void DbObject::OnConfigUpdate(void)
 {
 	/* Default handler does nothing. */
diff --git a/lib/db_ido/dbobject.hpp b/lib/db_ido/dbobject.hpp
index 4867794..f9ab0ec 100644
--- a/lib/db_ido/dbobject.hpp
+++ b/lib/db_ido/dbobject.hpp
@@ -92,8 +92,6 @@ public:
 protected:
 	DbObject(const intrusive_ptr<DbType>& type, const String& name1, const String& name2);
 
-	virtual bool IsStatusAttribute(const String& attribute) const;
-
 	virtual void OnConfigUpdate(void);
 	virtual void OnStatusUpdate(void);
 
diff --git a/lib/db_ido/hostgroupdbobject.cpp b/lib/db_ido/hostgroupdbobject.cpp
index fc66183..7de968e 100644
--- a/lib/db_ido/hostgroupdbobject.cpp
+++ b/lib/db_ido/hostgroupdbobject.cpp
@@ -48,5 +48,5 @@ Dictionary::Ptr HostGroupDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr HostGroupDbObject::GetStatusFields(void) const
 {
-	return Empty;
+	return Dictionary::Ptr();
 }
diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp
index 2ad793a..81ca8a3 100644
--- a/lib/db_ido/servicedbobject.cpp
+++ b/lib/db_ido/servicedbobject.cpp
@@ -171,11 +171,6 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields(void) const
 	return fields;
 }
 
-bool ServiceDbObject::IsStatusAttribute(const String& attribute) const
-{
-	return (attribute == "last_result");
-}
-
 void ServiceDbObject::OnConfigUpdate(void)
 {
 	Service::Ptr service = static_pointer_cast<Service>(GetObject());
diff --git a/lib/db_ido/servicedbobject.hpp b/lib/db_ido/servicedbobject.hpp
index fa94467..69958d6 100644
--- a/lib/db_ido/servicedbobject.hpp
+++ b/lib/db_ido/servicedbobject.hpp
@@ -45,8 +45,6 @@ public:
 	virtual Dictionary::Ptr GetStatusFields(void) const override;
 
 protected:
-	virtual bool IsStatusAttribute(const String& attribute) const override;
-
 	virtual void OnConfigUpdate(void) override;
 	virtual void OnStatusUpdate(void) override;
 };
diff --git a/lib/db_ido/servicegroupdbobject.cpp b/lib/db_ido/servicegroupdbobject.cpp
index 92bcfaa..d3395fc 100644
--- a/lib/db_ido/servicegroupdbobject.cpp
+++ b/lib/db_ido/servicegroupdbobject.cpp
@@ -47,5 +47,5 @@ Dictionary::Ptr ServiceGroupDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr ServiceGroupDbObject::GetStatusFields(void) const
 {
-	return Empty;
+	return Dictionary::Ptr();
 }
diff --git a/lib/db_ido/userdbobject.cpp b/lib/db_ido/userdbobject.cpp
index ae69874..ce0a89e 100644
--- a/lib/db_ido/userdbobject.cpp
+++ b/lib/db_ido/userdbobject.cpp
@@ -140,8 +140,3 @@ void UserDbObject::OnConfigUpdate(void)
 		}
 	}
 }
-
-bool UserDbObject::IsStatusAttribute(const String& attribute) const
-{
-	return (attribute == "last_notification");
-}
diff --git a/lib/db_ido/userdbobject.hpp b/lib/db_ido/userdbobject.hpp
index 176455b..df78299 100644
--- a/lib/db_ido/userdbobject.hpp
+++ b/lib/db_ido/userdbobject.hpp
@@ -42,8 +42,6 @@ public:
 	virtual Dictionary::Ptr GetStatusFields(void) const override;
 
 	virtual void OnConfigUpdate(void) override;
-
-	virtual bool IsStatusAttribute(const String& attribute) const override;
 };
 
 }
diff --git a/lib/db_ido/usergroupdbobject.cpp b/lib/db_ido/usergroupdbobject.cpp
index 70ad6db..a5419b5 100644
--- a/lib/db_ido/usergroupdbobject.cpp
+++ b/lib/db_ido/usergroupdbobject.cpp
@@ -45,5 +45,5 @@ Dictionary::Ptr UserGroupDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr UserGroupDbObject::GetStatusFields(void) const
 {
-	return Empty;
+	return Dictionary::Ptr();
 }



More information about the icinga-checkins mailing list