[icinga-checkins] icinga.org: icinga2/feature/memory-usage: Remove unused attributes

git at icinga.org git at icinga.org
Sat Nov 8 11:31:14 CET 2014


Module: icinga2
Branch: feature/memory-usage
Commit: ade12dc27a6134ad4227d3e641da6030c62ffa92
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=ade12dc27a6134ad4227d3e641da6030c62ffa92

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Nov  7 21:40:47 2014 +0100

Remove unused attributes

---

 lib/base/dynamicobject.ti      |    4 ----
 lib/icinga/checkable.cpp       |    2 +-
 lib/icinga/command.cpp         |    2 +-
 lib/icinga/customvarobject.cpp |    2 +-
 lib/icinga/customvarobject.ti  |    2 +-
 lib/icinga/notification.ti     |    1 -
 lib/icinga/user.cpp            |    2 +-
 7 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/base/dynamicobject.ti b/lib/base/dynamicobject.ti
index b916326..c92870d 100644
--- a/lib/base/dynamicobject.ti
+++ b/lib/base/dynamicobject.ti
@@ -48,7 +48,6 @@ abstract class DynamicObject
 	[config] String zone;
 	[config, internal, get_protected] Array::Ptr templates;
 	[config] Dictionary::Ptr methods;
-	[config] Dictionary::Ptr vars (VarsRaw);
 	[get_protected] bool active;
 	[get_protected] bool paused {
 		default {{{ return true; }}}
@@ -58,11 +57,8 @@ abstract class DynamicObject
 	[get_protected] bool pause_called;
 	[get_protected] bool resume_called;
 	[enum] HAMode ha_mode (HAMode);
-	Dictionary::Ptr authority_info;
 	[protected] Dictionary::Ptr extensions;
 
-	[state] Value override_vars;
-
 	[protected] bool state_loaded;
 };
 
diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp
index ad44f05..234d058 100644
--- a/lib/icinga/checkable.cpp
+++ b/lib/icinga/checkable.cpp
@@ -197,7 +197,7 @@ int Checkable::GetModifiedAttributes(void) const
 	if (!GetOverrideCheckPeriod().IsEmpty())
 		attrs |= ModAttrCheckTimeperiod;
 
-	if (!GetOverrideVars().IsEmpty())
+	if (GetOverrideVars())
 		attrs |= ModAttrCustomVariable;
 
 	// TODO: finish
diff --git a/lib/icinga/command.cpp b/lib/icinga/command.cpp
index d77a5e9..b7d979d 100644
--- a/lib/icinga/command.cpp
+++ b/lib/icinga/command.cpp
@@ -30,7 +30,7 @@ int Command::GetModifiedAttributes(void) const
 {
 	int attrs = 0;
 
-	if (!GetOverrideVars().IsEmpty())
+	if (GetOverrideVars())
 		attrs |= ModAttrCustomVariable;
 
 	return attrs;
diff --git a/lib/icinga/customvarobject.cpp b/lib/icinga/customvarobject.cpp
index 0950552..8687af2 100644
--- a/lib/icinga/customvarobject.cpp
+++ b/lib/icinga/customvarobject.cpp
@@ -28,7 +28,7 @@ boost::signals2::signal<void (const CustomVarObject::Ptr&, const Dictionary::Ptr
 
 Dictionary::Ptr CustomVarObject::GetVars(void) const
 {
-	if (!GetOverrideVars().IsEmpty())
+	if (GetOverrideVars())
 		return GetOverrideVars();
 	else
 		return GetVarsRaw();
diff --git a/lib/icinga/customvarobject.ti b/lib/icinga/customvarobject.ti
index a4dd0c9..af78383 100644
--- a/lib/icinga/customvarobject.ti
+++ b/lib/icinga/customvarobject.ti
@@ -26,7 +26,7 @@ abstract class CustomVarObject : DynamicObject
 {
 	[config] Dictionary::Ptr vars (VarsRaw);
 
-	[state] Value override_vars;
+	[state] Dictionary::Ptr override_vars;
 };
 
 }
diff --git a/lib/icinga/notification.ti b/lib/icinga/notification.ti
index 058f04d..2db5f31 100644
--- a/lib/icinga/notification.ti
+++ b/lib/icinga/notification.ti
@@ -37,7 +37,6 @@ class Notification : CustomVarObject < NotificationNameComposer
 		default {{{ return 1800; }}}
 	};
 	[config] String period (PeriodRaw);
-	[config] Dictionary::Ptr macros;
 	[config, protected] Array::Ptr users (UsersRaw);
 	[config, protected] Array::Ptr user_groups (UserGroupsRaw);
 	[config] Dictionary::Ptr times;
diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp
index 6649bef..18342e6 100644
--- a/lib/icinga/user.cpp
+++ b/lib/icinga/user.cpp
@@ -114,7 +114,7 @@ int User::GetModifiedAttributes(void) const
 {
 	int attrs = 0;
 
-	if (!GetOverrideVars().IsEmpty())
+	if (GetOverrideVars())
 		attrs |= ModAttrCustomVariable;
 
 	return attrs;



More information about the icinga-checkins mailing list