From 050a080be366b509546dbd19d36e3ff068fac8a1 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 26 Aug 2018 05:29:42 +0300 Subject: [PATCH] Enabling -Wshadow [#CLICKHOUSE-2] --- dbms/src/Common/Config/ConfigReloader.cpp | 8 +++----- dbms/src/Common/Config/ConfigReloader.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dbms/src/Common/Config/ConfigReloader.cpp b/dbms/src/Common/Config/ConfigReloader.cpp index 3c6311ee021..f798569d0c0 100644 --- a/dbms/src/Common/Config/ConfigReloader.cpp +++ b/dbms/src/Common/Config/ConfigReloader.cpp @@ -141,12 +141,10 @@ struct ConfigReloader::FileWithTimestamp }; -void ConfigReloader::FilesChangesTracker::addIfExists(const std::string & path) +void ConfigReloader::FilesChangesTracker::addIfExists(const std::string & path_to_add) { - if (!path.empty() && Poco::File(path).exists()) - { - files.emplace(path, Poco::File(path).getLastModified().epochTime()); - } + if (!path_to_add.empty() && Poco::File(path_to_add).exists()) + files.emplace(path_to_add, Poco::File(path_to_add).getLastModified().epochTime()); } bool ConfigReloader::FilesChangesTracker::isDifferOrNewerThan(const FilesChangesTracker & rhs) diff --git a/dbms/src/Common/Config/ConfigReloader.h b/dbms/src/Common/Config/ConfigReloader.h index e50b9e34837..63ed18a9105 100644 --- a/dbms/src/Common/Config/ConfigReloader.h +++ b/dbms/src/Common/Config/ConfigReloader.h @@ -56,7 +56,7 @@ private: { std::set files; - void addIfExists(const std::string & path); + void addIfExists(const std::string & path_to_add); bool isDifferOrNewerThan(const FilesChangesTracker & rhs); };