]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crypto: Build without using namespace declarations in headers
authorAdam C. Emerson <aemerson@redhat.com>
Sat, 21 Mar 2020 16:51:58 +0000 (12:51 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Sun, 22 Mar 2020 04:28:39 +0000 (00:28 -0400)
This is part of a series of commits to clean up using namespace at top
level in headers.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/crypto/crypto_plugin.h
src/crypto/isa-l/isal_crypto_plugin.cc
src/crypto/isa-l/isal_crypto_plugin.h
src/crypto/openssl/openssl_crypto_accel.cc
src/crypto/openssl/openssl_crypto_plugin.cc
src/crypto/openssl/openssl_crypto_plugin.h

index 5ccb8814da73d040ea283e1c3b5606346ef0d8d8..cf22d5cb42505d97f28d13255bdae917216ef01a 100644 (file)
@@ -22,7 +22,7 @@
 #include "crypto/crypto_accel.h"
 // -----------------------------------------------------------------------------
 
-class CryptoPlugin : public Plugin {
+class CryptoPlugin : public ceph::Plugin {
 
 public:
   CryptoAccelRef cryptoaccel;
index 6101dda906e9a069122c227dc3bc152026f3f167..85f0e5f0f8409860be66e12277dddb5521bc7451 100644 (file)
@@ -28,7 +28,7 @@ int __ceph_plugin_init(CephContext *cct,
                        const std::string& type,
                        const std::string& name)
 {
-  PluginRegistry *instance = cct->get_plugin_registry();
+  auto instance = cct->get_plugin_registry();
 
   return instance->add(type, name, new ISALCryptoPlugin(cct));
 }
index bfd2a11937472a4b54fb800bdf6b35d0e97fd56f..68e782e69fc0a07ac8fc96c799fcbc465e304ade 100644 (file)
@@ -31,7 +31,7 @@ public:
   ~ISALCryptoPlugin()
   {}
   virtual int factory(CryptoAccelRef *cs,
-                      ostream *ss)
+                      std::ostream *ss)
   {
     if (cryptoaccel == nullptr)
     {
index 2eae753068452a1f6d078c9c6a441325c3c4f558..e6ea0fa7290cd385bf4483d8f34190fdd6d5e4a7 100644 (file)
@@ -23,7 +23,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(_dout)
 
-static ostream&
+static std::ostream&
 _prefix(std::ostream* _dout)
 {
   return *_dout << "OpensslCryptoAccel: ";
index a3ac5994d0ec97cba600856d42aca3abb7d47ba8..e6ecea2fd9a2c712baeebfeb4f04dcc25ef95f64 100644 (file)
@@ -26,7 +26,7 @@ int __ceph_plugin_init(CephContext *cct,
                        const std::string& type,
                        const std::string& name)
 {
-  PluginRegistry *instance = cct->get_plugin_registry();
+  auto instance = cct->get_plugin_registry();
 
   return instance->add(type, name, new OpenSSLCryptoPlugin(cct));
 }
index cbf7274607e79ae88ddbf59c9a3a19368011a35e..408d9ebdaa7b8eb93055bda1cd82c35924b09f01 100644 (file)
@@ -25,7 +25,7 @@ class OpenSSLCryptoPlugin : public CryptoPlugin {
 public:
   explicit OpenSSLCryptoPlugin(CephContext* cct) : CryptoPlugin(cct)
   {}
-  int factory(CryptoAccelRef *cs, ostream *ss) override {
+  int factory(CryptoAccelRef *cs, std::ostream *ss) override {
     if (cryptoaccel == nullptr)
       cryptoaccel = CryptoAccelRef(new OpenSSLCryptoAccel);