From bf15164d8e48eb2d60b43ad2a599ffe504739286 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 6 Feb 2022 14:10:32 -0500 Subject: Use C++17's concat namespace feature --- src/lib/pubkey/keypair/keypair.cpp | 6 +----- src/lib/pubkey/pem/pem.cpp | 6 +----- src/lib/pubkey/pkcs8.cpp | 6 +----- src/lib/pubkey/x509_key.cpp | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) (limited to 'src/lib/pubkey') diff --git a/src/lib/pubkey/keypair/keypair.cpp b/src/lib/pubkey/keypair/keypair.cpp index f5ce33df2..9db77c3b1 100644 --- a/src/lib/pubkey/keypair/keypair.cpp +++ b/src/lib/pubkey/keypair/keypair.cpp @@ -9,9 +9,7 @@ #include #include -namespace Botan { - -namespace KeyPair { +namespace Botan::KeyPair { /* * Check an encryption key pair for consistency @@ -81,5 +79,3 @@ bool signature_consistency_check(RandomNumberGenerator& rng, } } - -} diff --git a/src/lib/pubkey/pem/pem.cpp b/src/lib/pubkey/pem/pem.cpp index 6fbde7210..0e8629fc9 100644 --- a/src/lib/pubkey/pem/pem.cpp +++ b/src/lib/pubkey/pem/pem.cpp @@ -10,9 +10,7 @@ #include #include -namespace Botan { - -namespace PEM_Code { +namespace Botan::PEM_Code { namespace { @@ -165,5 +163,3 @@ bool matches(DataSource& source, const std::string& extra, } } - -} diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp index 73210f426..e7e2d62b4 100644 --- a/src/lib/pubkey/pkcs8.cpp +++ b/src/lib/pubkey/pkcs8.cpp @@ -19,9 +19,7 @@ #include #endif -namespace Botan { - -namespace PKCS8 { +namespace Botan::PKCS8 { namespace { @@ -384,5 +382,3 @@ std::unique_ptr load_key(DataSource& source) } } - -} diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp index 6de149e97..5952d5ccd 100644 --- a/src/lib/pubkey/x509_key.cpp +++ b/src/lib/pubkey/x509_key.cpp @@ -12,9 +12,7 @@ #include #include -namespace Botan { - -namespace X509 { +namespace Botan::X509 { /* * PEM encode a X.509 public key @@ -67,5 +65,3 @@ Public_Key* load_key(DataSource& source) } } - -} -- cgit v1.2.3