diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 18:49:13 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 3b1278f5459514a6d6364f068ff97b8a0432057b (patch) | |
tree | 6e1369f28c64b45ac3254225242ebf3844ad0291 /src/mime-getpart.cc | |
parent | c0234d1b0cea8ac830e9397da8b2270a8f2b45ca (diff) |
formatted source and header files
Diffstat (limited to 'src/mime-getpart.cc')
-rw-r--r-- | src/mime-getpart.cc | 31 |
1 files changed, 14 insertions, 17 deletions
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 <string> -#include <vector> -#include <map> +#include "mime.h" + #include <exception> #include <iostream> +#include <map> +#include <string> +#include <vector> -#include <string.h> #include <ctype.h> -#include <stdio.h> #include <errno.h> +#include <stdio.h> +#include <string.h> 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; |