diff options
Diffstat (limited to 'src/mime.cc')
-rw-r--r-- | src/mime.cc | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/src/mime.cc b/src/mime.cc index 972d5e5..fa2e2ea 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -5,17 +5,19 @@ * @date 2002-2005 * ----------------------------------------------------------------- **/ #include "mime.h" + #include "convert.h" -#include <string> -#include <vector> -#include <map> + #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; @@ -27,9 +29,7 @@ Binc::MimeDocument::MimeDocument(void) : MimePart() } //------------------------------------------------------------------------ -Binc::MimeDocument::~MimeDocument(void) -{ -} +Binc::MimeDocument::~MimeDocument(void) {} //------------------------------------------------------------------------ void Binc::MimeDocument::clear(void) const @@ -59,14 +59,10 @@ Binc::MimePart::MimePart(void) } //------------------------------------------------------------------------ -Binc::MimePart::~MimePart(void) -{ -} +Binc::MimePart::~MimePart(void) {} //------------------------------------------------------------------------ -Binc::HeaderItem::HeaderItem(void) -{ -} +Binc::HeaderItem::HeaderItem(void) {} //------------------------------------------------------------------------ Binc::HeaderItem::HeaderItem(const string &key, const string &value) @@ -76,14 +72,10 @@ Binc::HeaderItem::HeaderItem(const string &key, const string &value) } //------------------------------------------------------------------------ -Binc::Header::Header(void) -{ -} +Binc::Header::Header(void) {} //------------------------------------------------------------------------ -Binc::Header::~Header(void) -{ -} +Binc::Header::~Header(void) {} //------------------------------------------------------------------------ bool Binc::Header::getFirstHeader(const string &key, HeaderItem &dest) const @@ -91,8 +83,7 @@ bool Binc::Header::getFirstHeader(const string &key, HeaderItem &dest) const string k = key; lowercase(k); - for (vector<HeaderItem>::const_iterator i = content.begin(); - i != content.end(); ++i) { + for (vector<HeaderItem>::const_iterator i = content.begin(); i != content.end(); ++i) { string tmp = (*i).getKey(); lowercase(tmp); @@ -110,12 +101,10 @@ bool Binc::Header::getAllHeaders(const string &key, vector<HeaderItem> &dest) co string k = key; lowercase(k); - for (vector<HeaderItem>::const_iterator i = content.begin(); - i != content.end(); ++i) { + for (vector<HeaderItem>::const_iterator i = content.begin(); i != content.end(); ++i) { string tmp = (*i).getKey(); lowercase(tmp); - if (tmp == k) - dest.push_back(*i); + if (tmp == k) dest.push_back(*i); } return (dest.size() != 0); |