guideline: remove 'using namespace' from headers
Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:
"Doing so takes away an #includer’s ability to effectively
disambiguate and to use alternatives. It also makes #included headers
order-dependent as they might have different meaning when included in
different orders."
For further reading:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive
Change-Id: I40fd6b31a94fe9a12426f76fc71d0832125a8740
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
diff --git a/bmc_epoch.hpp b/bmc_epoch.hpp
index 898029f..29748a6 100644
--- a/bmc_epoch.hpp
+++ b/bmc_epoch.hpp
@@ -13,8 +13,6 @@
namespace time
{
-using namespace std::chrono;
-
using EpochTimeIntf = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Time::server::EpochTime>;
diff --git a/settings.cpp b/settings.cpp
index b662628..c7fde05 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -10,6 +10,7 @@
PHOSPHOR_LOG2_USING;
+using namespace phosphor::time::utils;
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
diff --git a/settings.hpp b/settings.hpp
index a61cae7..0753e1e 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -11,8 +11,6 @@
namespace settings
{
-using namespace phosphor::time::utils;
-
constexpr auto root = "/";
constexpr auto timeSyncIntf = "xyz.openbmc_project.Time.Synchronization";
@@ -35,7 +33,7 @@
~Objects() = default;
/** @brief time sync method settings object */
- Path timeSyncMethod = DEFAULT_TIME_SYNC_OBJECT_PATH;
+ phosphor::time::utils::Path timeSyncMethod = DEFAULT_TIME_SYNC_OBJECT_PATH;
};
} // namespace settings