From 6c82afcddc23b7cfcf701a5393ca851991e1fedd Mon Sep 17 00:00:00 2001 From: Kitsu Date: Sat, 18 Mar 2017 13:44:34 +0300 Subject: [PATCH] Remove unnecessary this keywords --- core/infra/config/peer_service_with_json.cpp | 16 ++++++++-------- core/infra/config/peer_service_with_json.hpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/infra/config/peer_service_with_json.cpp b/core/infra/config/peer_service_with_json.cpp index 27b59c7b4d..b542b2c474 100644 --- a/core/infra/config/peer_service_with_json.cpp +++ b/core/infra/config/peer_service_with_json.cpp @@ -34,31 +34,31 @@ PeerServiceConfig& PeerServiceConfig::getInstance() { } std::string PeerServiceConfig::getMyPublicKeyWithDefault(const std::string& defaultValue) { - auto config = this->getConfigData(); + auto config = getConfigData(); if (!config.is_null()) { - return this->getConfigData()["me"].value("publicKey", defaultValue); + return getConfigData()["me"].value("publicKey", defaultValue); } return defaultValue; } std::string PeerServiceConfig::getMyPrivateKeyWithDefault(const std::string& defaultValue) { - auto config = this->getConfigData(); + auto config = getConfigData(); if (!config.is_null()) { - return this->getConfigData()["me"].value("privateKey", defaultValue); + return getConfigData()["me"].value("privateKey", defaultValue); } return defaultValue; } std::string PeerServiceConfig::getMyIpWithDefault(const std::string& defaultValue) { - auto config = this->getConfigData(); + auto config = getConfigData(); if (!config.is_null()) { - return this->getConfigData()["me"].value("ip", defaultValue); + return getConfigData()["me"].value("ip", defaultValue); } return defaultValue; } double PeerServiceConfig::getMaxTrustScoreWithDefault(double defaultValue) { - return this->getConfigData().value("max_trust_score", defaultValue); + return getConfigData().value("max_trust_score", defaultValue); } void PeerServiceConfig::parseConfigDataFromString(std::string&& jsonStr) { @@ -82,7 +82,7 @@ double PeerServiceConfig::getMaxTrustScore() { } std::vector PeerServiceConfig::getGroup() { - auto config = this->getConfigData(); + auto config = getConfigData(); if (!config.is_null()) { return getConfigData()["group"].get>(); } diff --git a/core/infra/config/peer_service_with_json.hpp b/core/infra/config/peer_service_with_json.hpp index 70d03d45b3..7163f34bb7 100644 --- a/core/infra/config/peer_service_with_json.hpp +++ b/core/infra/config/peer_service_with_json.hpp @@ -43,7 +43,7 @@ class PeerServiceConfig : config::AbstractConfigManager { double getMaxTrustScore(); - virtual std::string getConfigName(); + virtual std::string getConfigName() override; }; }