aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2018-08-18 14:08:25 +0000
committerVincent Richard <[email protected]>2018-08-18 14:08:25 +0000
commitf173b0a535e4d97c3ecd913eafb5e5c40aca2d44 (patch)
treec2c355b2e7fa5df7d5ea1c43154f274ee075c4ad /doc
parentFixed delete array. (diff)
downloadvmime-f173b0a535e4d97c3ecd913eafb5e5c40aca2d44.tar.gz
vmime-f173b0a535e4d97c3ecd913eafb5e5c40aca2d44.zip
Avoid copy by passing shared_ptr<> with const reference.
Diffstat (limited to 'doc')
-rw-r--r--doc/book/net.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/book/net.tex b/doc/book/net.tex
index 361733ed..301e3f11 100644
--- a/doc/book/net.tex
+++ b/doc/book/net.tex
@@ -360,7 +360,7 @@ class mySASLAuthenticator : public vmime::security::sasl::defaultSASLAuthenticat
const std::vector <vmime::shared_ptr <mechanism> > getAcceptableMechanisms
(const std::vector <vmime::shared_ptr <mechanism> >& available,
- vmime::shared_ptr <mechanism> suggested) const
+ const vmime::shared_ptr <mechanism>& suggested) const
{
// Here, you can sort the SASL mechanisms in the order they will be
// tried. If no SASL mechanism is acceptable (ie. for example, not
@@ -372,7 +372,7 @@ class mySASLAuthenticator : public vmime::security::sasl::defaultSASLAuthenticat
getAcceptableMechanisms(available, suggested);
}
- void setSASLMechanism(vmime::shared_ptr <mechanism> mech)
+ void setSASLMechanism(const vmime::shared_ptr <mechanism>& mech)
{
// This is called when the authentication process is going to
// try the specified mechanism.
@@ -982,7 +982,7 @@ class myCertVerifier : public vmime::security::cert::certificateVerifier
{
public:
- void verify(vmime::shared_ptr <certificateChain> certs)
+ void verify(const vmime::shared_ptr <certificateChain>& certs)
{
// Obtain the subject's certificate
vmime::shared_ptr <vmime::security::cert::certificate> cert = chain->getAt(0);
@@ -1130,7 +1130,7 @@ class myTracerFactory : public vmime::net::tracerFactory
public:
vmime::shared_ptr <vmime::net::tracer> create
- (vmime::shared_ptr <vmime::net::service> serv,
+ (const vmime::shared_ptr <vmime::net::service>& serv,
const int connectionId)
{
return vmime::make_shared <myTracer>