From: Adam C. Emerson Date: Sat, 21 Mar 2020 16:51:58 +0000 (-0400) Subject: crypto: Build without using namespace declarations in headers X-Git-Tag: v16.1.0~2810^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0b1935bc3fec1901126258d3f41fd44ead447db8;p=ceph.git crypto: Build without using namespace declarations in headers This is part of a series of commits to clean up using namespace at top level in headers. Signed-off-by: Adam C. Emerson --- diff --git a/src/crypto/crypto_plugin.h b/src/crypto/crypto_plugin.h index 5ccb8814da73..cf22d5cb4250 100644 --- a/src/crypto/crypto_plugin.h +++ b/src/crypto/crypto_plugin.h @@ -22,7 +22,7 @@ #include "crypto/crypto_accel.h" // ----------------------------------------------------------------------------- -class CryptoPlugin : public Plugin { +class CryptoPlugin : public ceph::Plugin { public: CryptoAccelRef cryptoaccel; diff --git a/src/crypto/isa-l/isal_crypto_plugin.cc b/src/crypto/isa-l/isal_crypto_plugin.cc index 6101dda906e9..85f0e5f0f840 100644 --- a/src/crypto/isa-l/isal_crypto_plugin.cc +++ b/src/crypto/isa-l/isal_crypto_plugin.cc @@ -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)); } diff --git a/src/crypto/isa-l/isal_crypto_plugin.h b/src/crypto/isa-l/isal_crypto_plugin.h index bfd2a1193747..68e782e69fc0 100644 --- a/src/crypto/isa-l/isal_crypto_plugin.h +++ b/src/crypto/isa-l/isal_crypto_plugin.h @@ -31,7 +31,7 @@ public: ~ISALCryptoPlugin() {} virtual int factory(CryptoAccelRef *cs, - ostream *ss) + std::ostream *ss) { if (cryptoaccel == nullptr) { diff --git a/src/crypto/openssl/openssl_crypto_accel.cc b/src/crypto/openssl/openssl_crypto_accel.cc index 2eae75306845..e6ea0fa7290c 100644 --- a/src/crypto/openssl/openssl_crypto_accel.cc +++ b/src/crypto/openssl/openssl_crypto_accel.cc @@ -23,7 +23,7 @@ #undef dout_prefix #define dout_prefix _prefix(_dout) -static ostream& +static std::ostream& _prefix(std::ostream* _dout) { return *_dout << "OpensslCryptoAccel: "; diff --git a/src/crypto/openssl/openssl_crypto_plugin.cc b/src/crypto/openssl/openssl_crypto_plugin.cc index a3ac5994d0ec..e6ecea2fd9a2 100644 --- a/src/crypto/openssl/openssl_crypto_plugin.cc +++ b/src/crypto/openssl/openssl_crypto_plugin.cc @@ -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)); } diff --git a/src/crypto/openssl/openssl_crypto_plugin.h b/src/crypto/openssl/openssl_crypto_plugin.h index cbf7274607e7..408d9ebdaa7b 100644 --- a/src/crypto/openssl/openssl_crypto_plugin.h +++ b/src/crypto/openssl/openssl_crypto_plugin.h @@ -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);