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. --- tests/parser/attachmentHelperTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/parser/attachmentHelperTest.cpp') diff --git a/tests/parser/attachmentHelperTest.cpp b/tests/parser/attachmentHelperTest.cpp index 4d4a2623..6bd3b7db 100644 --- a/tests/parser/attachmentHelperTest.cpp +++ b/tests/parser/attachmentHelperTest.cpp @@ -39,7 +39,7 @@ VMIME_TEST_SUITE_BEGIN(attachmentHelperTest) VMIME_TEST_LIST_END - static const vmime::string getStructure(vmime::shared_ptr part) + static const vmime::string getStructure(const vmime::shared_ptr & part) { vmime::shared_ptr bdy = part->getBody(); @@ -63,7 +63,7 @@ VMIME_TEST_SUITE_BEGIN(attachmentHelperTest) return res + "]"; } - static const vmime::string extractBodyContents(vmime::shared_ptr part) + static const vmime::string extractBodyContents(const vmime::shared_ptr & part) { vmime::shared_ptr cth = part->getBody()->getContents(); -- cgit v1.2.3