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/certificate.cpp b/certificate.cpp
index 88ff65e..de7a455 100644
--- a/certificate.cpp
+++ b/certificate.cpp
@@ -17,9 +17,7 @@
#include <xyz/openbmc_project/Certs/error.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
-namespace phosphor
-{
-namespace certs
+namespace phosphor::certs
{
// RAII support for openSSL functions.
using BIO_MEM_Ptr = std::unique_ptr<BIO, decltype(&::BIO_free)>;
@@ -727,5 +725,4 @@
{
manager.deleteCertificate(this);
}
-} // namespace certs
-} // namespace phosphor
+} // namespace phosphor::certs