Skip to content

Commit

Permalink
Remove unnecessary this keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
l4l committed Mar 18, 2017
1 parent 2ab9255 commit 6c82afc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions core/infra/config/peer_service_with_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -82,7 +82,7 @@ double PeerServiceConfig::getMaxTrustScore() {
}

std::vector<json> PeerServiceConfig::getGroup() {
auto config = this->getConfigData();
auto config = getConfigData();
if (!config.is_null()) {
return getConfigData()["group"].get<std::vector<json>>();
}
Expand Down
2 changes: 1 addition & 1 deletion core/infra/config/peer_service_with_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PeerServiceConfig : config::AbstractConfigManager {

double getMaxTrustScore();

virtual std::string getConfigName();
virtual std::string getConfigName() override;
};
}

Expand Down

0 comments on commit 6c82afc

Please sign in to comment.