From f173b0a535e4d97c3ecd913eafb5e5c40aca2d44 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sat, 18 Aug 2018 16:08:25 +0200 Subject: Avoid copy by passing shared_ptr<> with const reference. --- examples/example6_authenticator.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/example6_authenticator.hpp') diff --git a/examples/example6_authenticator.hpp b/examples/example6_authenticator.hpp index b46f8ebd..64336e2a 100644 --- a/examples/example6_authenticator.hpp +++ b/examples/example6_authenticator.hpp @@ -7,7 +7,7 @@ class interactiveAuthenticator : public vmime::security::sasl::defaultSASLAuthen { const std::vector > getAcceptableMechanisms (const std::vector >& available, - vmime::shared_ptr suggested) const + const vmime::shared_ptr & suggested) const { std::cout << std::endl << "Available SASL mechanisms:" << std::endl; @@ -24,7 +24,7 @@ class interactiveAuthenticator : public vmime::security::sasl::defaultSASLAuthen return defaultSASLAuthenticator::getAcceptableMechanisms(available, suggested); } - void setSASLMechanism(vmime::shared_ptr mech) + void setSASLMechanism(const vmime::shared_ptr & mech) { std::cout << "Trying '" << mech->getName() << "' authentication mechanism" << std::endl; -- cgit v1.2.3