Use nested namespace
Nested namespace is introduced in C++ 17. This saves nearly 50 lines.
This change also puts tests into a nested namespace, which saves
unnecessary using directives.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I7c3e38588fd5c2cbd83ac13ee24327318e8c06a4
diff --git a/watch.hpp b/watch.hpp
index d98c322..2cf34aa 100644
--- a/watch.hpp
+++ b/watch.hpp
@@ -5,9 +5,7 @@
#include <sdeventplus/source/io.hpp>
#include <string>
-namespace phosphor
-{
-namespace certs
+namespace phosphor::certs
{
/** @class Watch
*
@@ -69,5 +67,4 @@
/** @brief Certificate file with path */
std::string certFile;
};
-} // namespace certs
-} // namespace phosphor
+} // namespace phosphor::certs