From 7f405a479acfd9e45afd364fb2105c7d285d6ba0 Mon Sep 17 00:00:00 2001 From: Adrian Szyndela Date: Tue, 12 Feb 2019 13:12:07 +0100 Subject: [PATCH] refactoring: remove unnecessary params in parseRule Removed params policy_type and policy_type_value from DbAdapter::parsePolicyAttribute() as they are used once and are references to policy_type and policy_type_value members. Change-Id: I59850b91fe739cd275d122a3df83ffb988c2cd74 --- src/internal/policy.cpp | 4 ++-- src/internal/policy.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/policy.cpp b/src/internal/policy.cpp index 0530194..5e46ad2 100755 --- a/src/internal/policy.cpp +++ b/src/internal/policy.cpp @@ -113,11 +113,11 @@ void DbAdapter::parsePolicy(bool bus, const char **attr) curr_bus = bus; for (int i = 0; attr[i]; i += 2) { - parsePolicyAttribute(attr[i], attr[i + 1], policy_type, policy_type_value); + parsePolicyAttribute(attr[i], attr[i + 1]); } } -void DbAdapter::parsePolicyAttribute(const char* name, const char* value, PolicyType& policy_type, PolicyTypeValue& policy_type_value) +void DbAdapter::parsePolicyAttribute(const char* name, const char* value) { //possible values (from dbus-daemon man): // context="(default|mandatory)" diff --git a/src/internal/policy.hpp b/src/internal/policy.hpp index 9edd541..1015283 100755 --- a/src/internal/policy.hpp +++ b/src/internal/policy.hpp @@ -305,7 +305,7 @@ namespace ldp_xml_parser PolicyTypeValue policy_type_value; bool curr_bus; - void parsePolicyAttribute(const char* name, const char* value, PolicyType& policy_type, PolicyTypeValue& policy_type_value); + void parsePolicyAttribute(const char* name, const char* value); void parseRuleAttribute(const char *name, const char *value); public: -- 2.7.4