From ae0cd86c4f604c77e166e731c3a56483230053d3 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 14 Nov 2006 13:19:57 +0000 Subject: [PATCH] Use std::copy instead of loop (thanks to Michal Rzechonek). --- src/attachmentHelper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp index e8ec82c2..da95513c 100644 --- a/src/attachmentHelper.cpp +++ b/src/attachmentHelper.cpp @@ -157,8 +157,7 @@ const std::vector > std::vector > partAtts = findAttachmentsInBodyPart(bdy->getPartAt(i)); - for (unsigned int j = 0 ; j < partAtts.size() ; ++j) - atts.push_back(partAtts[j]); + std::copy(partAtts.begin(), partAtts.end(), std::back_inserter(atts)); } }