security: move shared_ptr<PibImpl> when possible
Also rename m_impl to m_pib, since it's not a pimpl pointer.
Change-Id: I9e10ada54332318154374f61df6e387348ccc60a
diff --git a/src/security/pib/detail/identity-impl.hpp b/src/security/pib/detail/identity-impl.hpp
index ceff37d..b4823a1 100644
--- a/src/security/pib/detail/identity-impl.hpp
+++ b/src/security/pib/detail/identity-impl.hpp
@@ -47,13 +47,15 @@
* @brief Create an Identity with @p identityName.
*
* @param identityName The name of the Identity.
- * @param impl The PIB backend implementation.
+ * @param pibImpl The PIB backend implementation.
* @param needInit If true, create the identity in backend when the identity does not exist.
* Otherwise, throw Pib::Error when the identity does not exist.
*/
- IdentityImpl(const Name& identityName, shared_ptr<PibImpl> impl, bool needInit = false);
+ IdentityImpl(const Name& identityName, shared_ptr<PibImpl> pibImpl, bool needInit = false);
- /// @brief Get the name of the identity.
+ /**
+ * @brief Get the name of the identity.
+ */
const Name&
getName() const
{
@@ -122,12 +124,11 @@
private:
Name m_name;
+ shared_ptr<PibImpl> m_pib;
+
+ KeyContainer m_keys;
mutable bool m_isDefaultKeyLoaded;
mutable Key m_defaultKey;
-
- mutable KeyContainer m_keys;
-
- shared_ptr<PibImpl> m_impl;
};
} // namespace detail