From 3b1278f5459514a6d6364f068ff97b8a0432057b Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sat, 7 Oct 2023 18:49:13 +0200 Subject: formatted source and header files --- src/mime-getpart.cc | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/mime-getpart.cc') diff --git a/src/mime-getpart.cc b/src/mime-getpart.cc index 7ce84fd..02a1ec5 100644 --- a/src/mime-getpart.cc +++ b/src/mime-getpart.cc @@ -4,27 +4,28 @@ * @author Andreas Aardal Hanssen * @date 2002-2005 * ----------------------------------------------------------------- **/ -#include "mime.h" #include "convert.h" -#include -#include -#include +#include "mime.h" + #include #include +#include +#include +#include -#include #include -#include #include +#include +#include using namespace ::std; //------------------------------------------------------------------------ const Binc::MimePart *Binc::MimePart::getPart(const string &findpart, - string genpart, FetchType fetchType) const + string genpart, + FetchType fetchType) const { - if (findpart == genpart) - return this; + if (findpart == genpart) return this; if (isMultipart()) { if (members.size() != 0) { @@ -33,14 +34,12 @@ const Binc::MimePart *Binc::MimePart::getPart(const string &findpart, while (i != members.end()) { BincStream ss; ss << genpart; - if (genpart != "") - ss << "."; + if (genpart != "") ss << "."; ss << part; const MimePart *m; if ((m = (*i).getPart(findpart, ss.str())) != 0) { - if (fetchType == FetchHeader && m->isMessageRFC822()) - m = &m->members[0]; + if (fetchType == FetchHeader && m->isMessageRFC822()) m = &m->members[0]; return m; } @@ -57,12 +56,10 @@ const Binc::MimePart *Binc::MimePart::getPart(const string &findpart, } } else { // Singlepart - if (genpart != "") - genpart += "."; + if (genpart != "") genpart += "."; genpart += "1"; - if (findpart == genpart) - return this; + if (findpart == genpart) return this; } return 0; -- cgit v1.2.3