aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2008-10-12 10:05:28 +0000
committerVincent Richard <[email protected]>2008-10-12 10:05:28 +0000
commit3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d (patch)
tree1968196db0d6ae27fd70d0732ff3defed0efb61f
parentEncode '?' characters to avoid breaking QP encoding (Zarafa). (diff)
downloadvmime-3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d.tar.gz
vmime-3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d.zip
Fixed compilation warnings.
-rw-r--r--examples/example6.cpp4
-rw-r--r--src/addressList.cpp4
-rw-r--r--src/attachmentHelper.cpp2
-rw-r--r--src/body.cpp8
-rw-r--r--src/charset.cpp4
-rw-r--r--src/component.cpp4
-rw-r--r--src/contentDisposition.cpp4
-rw-r--r--src/dateTime.cpp30
-rw-r--r--src/disposition.cpp2
-rw-r--r--src/emptyContentHandler.cpp6
-rw-r--r--src/encoderB64.cpp4
-rw-r--r--src/encoderDefault.cpp4
-rw-r--r--src/encoderFactory.cpp2
-rw-r--r--src/encoderQP.cpp9
-rw-r--r--src/encoderUUE.cpp8
-rw-r--r--src/encoding.cpp4
-rw-r--r--src/fileAttachment.cpp12
-rw-r--r--src/header.cpp13
-rw-r--r--src/headerField.cpp2
-rw-r--r--src/htmlTextPart.cpp6
-rw-r--r--src/mailbox.cpp13
-rw-r--r--src/mailboxGroup.cpp6
-rw-r--r--src/mailboxList.cpp4
-rw-r--r--src/mdn/MDNHelper.cpp4
-rw-r--r--src/mediaType.cpp4
-rw-r--r--src/messageBuilder.cpp2
-rw-r--r--src/messageId.cpp4
-rw-r--r--src/messageIdSequence.cpp4
-rw-r--r--src/messageParser.cpp4
-rw-r--r--src/misc/importanceHelper.cpp4
-rw-r--r--src/net/defaultConnectionInfos.cpp2
-rw-r--r--src/net/events.cpp6
-rw-r--r--src/net/imap/IMAPConnection.cpp9
-rw-r--r--src/net/imap/IMAPFolder.cpp16
-rw-r--r--src/net/imap/IMAPMessage.cpp15
-rw-r--r--src/net/imap/IMAPStore.cpp10
-rw-r--r--src/net/imap/IMAPTag.cpp8
-rw-r--r--src/net/imap/IMAPUtils.cpp8
-rw-r--r--src/net/maildir/format/courierMaildirFormat.cpp10
-rw-r--r--src/net/maildir/format/kmailMaildirFormat.cpp8
-rw-r--r--src/net/maildir/maildirFolder.cpp14
-rw-r--r--src/net/maildir/maildirMessage.cpp22
-rw-r--r--src/net/maildir/maildirStore.cpp10
-rw-r--r--src/net/maildir/maildirUtils.cpp6
-rw-r--r--src/net/message.cpp2
-rw-r--r--src/net/pop3/POP3Folder.cpp14
-rw-r--r--src/net/pop3/POP3Message.cpp8
-rw-r--r--src/net/pop3/POP3Store.cpp20
-rw-r--r--src/net/sendmail/sendmailTransport.cpp6
-rw-r--r--src/net/serviceFactory.cpp2
-rw-r--r--src/net/serviceInfos.cpp6
-rw-r--r--src/net/serviceRegistration.inl2
-rw-r--r--src/net/smtp/SMTPResponse.cpp8
-rw-r--r--src/net/smtp/SMTPTransport.cpp4
-rw-r--r--src/net/tls/TLSSecuredConnectionInfos.cpp2
-rw-r--r--src/net/tls/TLSSocket.cpp4
-rw-r--r--src/net/transport.cpp2
-rw-r--r--src/parameter.cpp4
-rw-r--r--src/parameterizedHeaderField.cpp12
-rw-r--r--src/path.cpp4
-rw-r--r--src/plainTextPart.cpp2
-rw-r--r--src/platforms/posix/posixChildProcess.cpp6
-rw-r--r--src/platforms/posix/posixFile.cpp24
-rw-r--r--src/platforms/posix/posixHandler.cpp4
-rw-r--r--src/platforms/posix/posixSocket.cpp4
-rw-r--r--src/platforms/windows/windowsFile.cpp20
-rw-r--r--src/platforms/windows/windowsHandler.cpp4
-rw-r--r--src/platforms/windows/windowsSocket.cpp4
-rw-r--r--src/propertySet.cpp26
-rw-r--r--src/relay.cpp2
-rw-r--r--src/security/cert/X509Certificate.cpp9
-rw-r--r--src/security/cert/certificateChain.cpp2
-rw-r--r--src/security/digest/md5/md5MessageDigest.cpp4
-rw-r--r--src/security/digest/sha1/sha1MessageDigest.cpp14
-rw-r--r--src/security/sasl/SASLMechanismFactory.cpp4
-rw-r--r--src/security/sasl/SASLSession.cpp2
-rw-r--r--src/security/sasl/SASLSocket.cpp4
-rw-r--r--src/security/sasl/builtinSASLMechanism.cpp14
-rw-r--r--src/streamContentHandler.cpp6
-rw-r--r--src/stringContentHandler.cpp6
-rw-r--r--src/text.cpp8
-rw-r--r--src/utility/datetimeUtils.cpp8
-rw-r--r--src/utility/filteredStream.cpp8
-rw-r--r--src/utility/path.cpp14
-rw-r--r--src/utility/progressListener.cpp2
-rw-r--r--src/utility/random.cpp6
-rw-r--r--src/utility/smartPtrInt.cpp22
-rw-r--r--src/utility/stream.cpp46
-rw-r--r--src/utility/stringProxy.cpp6
-rw-r--r--src/utility/stringUtils.cpp12
-rw-r--r--src/utility/url.cpp2
-rw-r--r--src/utility/urlUtils.cpp6
-rw-r--r--src/word.cpp10
-rw-r--r--src/wordEncoder.cpp6
-rw-r--r--tests/testRunner.cpp2
-rw-r--r--tests/testUtils.cpp10
-rw-r--r--tests/testUtils.hpp10
-rw-r--r--tests/utility/filteredStreamTest.cpp6
-rw-r--r--tests/utility/smartPtrTest.cpp4
-rw-r--r--tests/utility/urlTest.cpp2
-rw-r--r--vmime/address.hpp4
-rw-r--r--vmime/addressList.hpp4
-rw-r--r--vmime/attachmentHelper.hpp2
-rw-r--r--vmime/body.hpp8
-rw-r--r--vmime/charset.hpp4
-rw-r--r--vmime/component.hpp4
-rw-r--r--vmime/contentDisposition.hpp4
-rw-r--r--vmime/contentHandler.hpp6
-rw-r--r--vmime/dateTime.hpp30
-rw-r--r--vmime/disposition.hpp2
-rw-r--r--vmime/emptyContentHandler.hpp6
-rw-r--r--vmime/encoder.hpp4
-rw-r--r--vmime/encoderB64.hpp4
-rw-r--r--vmime/encoderDefault.hpp4
-rw-r--r--vmime/encoderFactory.hpp2
-rw-r--r--vmime/encoderQP.hpp4
-rw-r--r--vmime/encoderUUE.hpp4
-rw-r--r--vmime/encoding.hpp4
-rw-r--r--vmime/fileAttachment.hpp12
-rw-r--r--vmime/header.hpp10
-rw-r--r--vmime/headerField.hpp2
-rw-r--r--vmime/htmlTextPart.hpp6
-rw-r--r--vmime/mailbox.hpp8
-rw-r--r--vmime/mailboxGroup.hpp6
-rw-r--r--vmime/mailboxList.hpp4
-rw-r--r--vmime/mdn/MDNHelper.hpp4
-rw-r--r--vmime/mediaType.hpp4
-rw-r--r--vmime/messageBuilder.hpp2
-rw-r--r--vmime/messageId.hpp4
-rw-r--r--vmime/messageIdSequence.hpp4
-rw-r--r--vmime/messageParser.hpp4
-rw-r--r--vmime/misc/importanceHelper.hpp4
-rw-r--r--vmime/net/connectionInfos.hpp2
-rw-r--r--vmime/net/defaultConnectionInfos.hpp2
-rw-r--r--vmime/net/events.hpp6
-rw-r--r--vmime/net/folder.hpp14
-rw-r--r--vmime/net/imap/IMAPConnection.hpp8
-rw-r--r--vmime/net/imap/IMAPFolder.hpp16
-rw-r--r--vmime/net/imap/IMAPMessage.hpp8
-rw-r--r--vmime/net/imap/IMAPParser.hpp42
-rw-r--r--vmime/net/imap/IMAPStore.hpp10
-rw-r--r--vmime/net/imap/IMAPTag.hpp2
-rw-r--r--vmime/net/imap/IMAPUtils.hpp6
-rw-r--r--vmime/net/maildir/format/courierMaildirFormat.hpp10
-rw-r--r--vmime/net/maildir/format/kmailMaildirFormat.hpp8
-rw-r--r--vmime/net/maildir/maildirFolder.hpp14
-rw-r--r--vmime/net/maildir/maildirFormat.hpp6
-rw-r--r--vmime/net/maildir/maildirMessage.hpp8
-rw-r--r--vmime/net/maildir/maildirStore.hpp8
-rw-r--r--vmime/net/maildir/maildirUtils.hpp6
-rw-r--r--vmime/net/message.hpp16
-rw-r--r--vmime/net/pop3/POP3Folder.hpp14
-rw-r--r--vmime/net/pop3/POP3Message.hpp8
-rw-r--r--vmime/net/pop3/POP3Store.hpp18
-rw-r--r--vmime/net/sendmail/sendmailTransport.hpp4
-rw-r--r--vmime/net/service.hpp6
-rw-r--r--vmime/net/serviceFactory.hpp4
-rw-r--r--vmime/net/serviceInfos.hpp6
-rw-r--r--vmime/net/smtp/SMTPResponse.hpp8
-rw-r--r--vmime/net/smtp/SMTPTransport.hpp4
-rw-r--r--vmime/net/socket.hpp4
-rw-r--r--vmime/net/store.hpp6
-rw-r--r--vmime/net/timeoutHandler.hpp4
-rw-r--r--vmime/net/tls/TLSSecuredConnectionInfos.hpp2
-rw-r--r--vmime/net/tls/TLSSocket.hpp4
-rw-r--r--vmime/net/transport.hpp2
-rw-r--r--vmime/parameterizedHeaderField.hpp6
-rw-r--r--vmime/parserHelpers.hpp12
-rw-r--r--vmime/path.hpp4
-rw-r--r--vmime/plainTextPart.hpp2
-rw-r--r--vmime/platform.hpp4
-rw-r--r--vmime/platforms/posix/posixFile.hpp24
-rw-r--r--vmime/platforms/posix/posixHandler.hpp4
-rw-r--r--vmime/platforms/posix/posixSocket.hpp4
-rw-r--r--vmime/platforms/windows/windowsFile.hpp24
-rw-r--r--vmime/platforms/windows/windowsHandler.hpp4
-rw-r--r--vmime/platforms/windows/windowsSocket.hpp4
-rw-r--r--vmime/propertySet.hpp34
-rw-r--r--vmime/security/cert/X509Certificate.hpp8
-rw-r--r--vmime/security/cert/certificate.hpp4
-rw-r--r--vmime/security/cert/certificateChain.hpp2
-rw-r--r--vmime/security/digest/md5/md5MessageDigest.hpp2
-rw-r--r--vmime/security/digest/messageDigest.hpp2
-rw-r--r--vmime/security/digest/sha1/sha1MessageDigest.hpp2
-rw-r--r--vmime/security/sasl/SASLMechanism.hpp4
-rw-r--r--vmime/security/sasl/SASLMechanismFactory.hpp2
-rw-r--r--vmime/security/sasl/SASLSession.hpp2
-rw-r--r--vmime/security/sasl/SASLSocket.hpp4
-rw-r--r--vmime/security/sasl/builtinSASLMechanism.hpp5
-rw-r--r--vmime/streamContentHandler.hpp6
-rw-r--r--vmime/stringContentHandler.hpp6
-rw-r--r--vmime/text.hpp8
-rw-r--r--vmime/textPart.hpp2
-rw-r--r--vmime/utility/datetimeUtils.hpp8
-rw-r--r--vmime/utility/file.hpp18
-rw-r--r--vmime/utility/filteredStream.hpp16
-rw-r--r--vmime/utility/path.hpp14
-rw-r--r--vmime/utility/progressListener.hpp4
-rw-r--r--vmime/utility/random.hpp6
-rw-r--r--vmime/utility/smartPtr.hpp12
-rw-r--r--vmime/utility/smartPtrInt.hpp10
-rw-r--r--vmime/utility/stream.hpp52
-rw-r--r--vmime/utility/stringProxy.hpp6
-rw-r--r--vmime/utility/stringUtils.hpp8
-rw-r--r--vmime/utility/url.hpp2
-rw-r--r--vmime/word.hpp4
-rw-r--r--vmime/wordEncoder.hpp4
207 files changed, 796 insertions, 789 deletions
diff --git a/examples/example6.cpp b/examples/example6.cpp
index a831d991..8bf7b44c 100644
--- a/examples/example6.cpp
+++ b/examples/example6.cpp
@@ -346,7 +346,7 @@ static void printFolders(vmime::ref <vmime::net::folder> folder, const int level
*
* @param choices menu choices
*/
-static const unsigned int printMenu(const std::vector <std::string>& choices)
+static unsigned int printMenu(const std::vector <std::string>& choices)
{
std::cout << std::endl;
@@ -780,7 +780,7 @@ static void connectStore()
*
* @return true to quit the program, false to continue
*/
-static const bool menu()
+static bool menu()
{
std::vector <std::string> items;
diff --git a/src/addressList.cpp b/src/addressList.cpp
index ca919c9b..fd7b35ce 100644
--- a/src/addressList.cpp
+++ b/src/addressList.cpp
@@ -202,13 +202,13 @@ void addressList::removeAllAddresses()
}
-const int addressList::getAddressCount() const
+int addressList::getAddressCount() const
{
return (m_list.size());
}
-const bool addressList::isEmpty() const
+bool addressList::isEmpty() const
{
return (m_list.empty());
}
diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp
index 8024fe78..ec6e2f73 100644
--- a/src/attachmentHelper.cpp
+++ b/src/attachmentHelper.cpp
@@ -36,7 +36,7 @@ namespace vmime
// static
-const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
+bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
{
try
{
diff --git a/src/body.cpp b/src/body.cpp
index 88414ab6..0e347623 100644
--- a/src/body.cpp
+++ b/src/body.cpp
@@ -378,7 +378,7 @@ const string body::generateRandomBoundaryString()
}
-const bool body::isValidBoundary(const string& boundary)
+bool body::isValidBoundary(const string& boundary)
{
static const string validChars("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'()+_,-./:=?");
@@ -469,7 +469,7 @@ void body::setParentPart(ref <bodyPart> parent)
}
-const bool body::isRootPart() const
+bool body::isRootPart() const
{
ref <const bodyPart> part = m_part.acquire();
return (part == NULL || part->getParentPart() == NULL);
@@ -674,13 +674,13 @@ void body::removeAllParts()
}
-const int body::getPartCount() const
+int body::getPartCount() const
{
return (m_parts.size());
}
-const bool body::isEmpty() const
+bool body::isEmpty() const
{
return (m_parts.size() == 0);
}
diff --git a/src/charset.cpp b/src/charset.cpp
index bd435faf..798d34fa 100644
--- a/src/charset.cpp
+++ b/src/charset.cpp
@@ -104,13 +104,13 @@ charset& charset::operator=(const charset& other)
}
-const bool charset::operator==(const charset& value) const
+bool charset::operator==(const charset& value) const
{
return (utility::stringUtils::isStringEqualNoCase(m_name, value.m_name));
}
-const bool charset::operator!=(const charset& value) const
+bool charset::operator!=(const charset& value) const
{
return !(*this == value);
}
diff --git a/src/component.cpp b/src/component.cpp
index 12b58081..69a60497 100644
--- a/src/component.cpp
+++ b/src/component.cpp
@@ -60,13 +60,13 @@ const string component::generate(const string::size_type maxLineLength,
}
-const string::size_type component::getParsedOffset() const
+string::size_type component::getParsedOffset() const
{
return (m_parsedOffset);
}
-const string::size_type component::getParsedLength() const
+string::size_type component::getParsedLength() const
{
return (m_parsedLength);
}
diff --git a/src/contentDisposition.cpp b/src/contentDisposition.cpp
index 476f2c0d..7ffa4244 100644
--- a/src/contentDisposition.cpp
+++ b/src/contentDisposition.cpp
@@ -77,13 +77,13 @@ contentDisposition& contentDisposition::operator=(const string& name)
}
-const bool contentDisposition::operator==(const contentDisposition& value) const
+bool contentDisposition::operator==(const contentDisposition& value) const
{
return (utility::stringUtils::toLower(m_name) == value.m_name);
}
-const bool contentDisposition::operator!=(const contentDisposition& value) const
+bool contentDisposition::operator!=(const contentDisposition& value) const
{
return !(*this == value);
}
diff --git a/src/dateTime.cpp b/src/dateTime.cpp
index 66c116fe..3af6da77 100644
--- a/src/dateTime.cpp
+++ b/src/dateTime.cpp
@@ -788,15 +788,15 @@ const std::vector <ref <const component> > datetime::getChildComponents() const
}
-const int datetime::getYear() const { return (m_year); }
-const int datetime::getMonth() const { return (m_month); }
-const int datetime::getDay() const { return (m_day); }
-const int datetime::getHour() const { return (m_hour); }
-const int datetime::getMinute() const { return (m_minute); }
-const int datetime::getSecond() const { return (m_second); }
-const int datetime::getZone() const { return (m_zone); }
-const int datetime::getWeekDay() const { return (utility::datetimeUtils::getDayOfWeek(m_year, m_month, m_day)); }
-const int datetime::getWeek() const { return utility::datetimeUtils::getWeekOfYear(m_year, m_month, m_day); }
+int datetime::getYear() const { return (m_year); }
+int datetime::getMonth() const { return (m_month); }
+int datetime::getDay() const { return (m_day); }
+int datetime::getHour() const { return (m_hour); }
+int datetime::getMinute() const { return (m_minute); }
+int datetime::getSecond() const { return (m_second); }
+int datetime::getZone() const { return (m_zone); }
+int datetime::getWeekDay() const { return (utility::datetimeUtils::getDayOfWeek(m_year, m_month, m_day)); }
+int datetime::getWeek() const { return utility::datetimeUtils::getWeekOfYear(m_year, m_month, m_day); }
void datetime::setYear(const int year) { m_year = year; }
void datetime::setMonth(const int month) { m_month = std::min(std::max(month, 1), 12); }
@@ -807,7 +807,7 @@ void datetime::setSecond(const int second) { m_second = second; }
void datetime::setZone(const int zone) { m_zone = zone; }
-const bool datetime::operator==(const datetime& other) const
+bool datetime::operator==(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
@@ -821,7 +821,7 @@ const bool datetime::operator==(const datetime& other) const
}
-const bool datetime::operator!=(const datetime& other) const
+bool datetime::operator!=(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
@@ -835,7 +835,7 @@ const bool datetime::operator!=(const datetime& other) const
}
-const bool datetime::operator<(const datetime& other) const
+bool datetime::operator<(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
@@ -849,7 +849,7 @@ const bool datetime::operator<(const datetime& other) const
}
-const bool datetime::operator<=(const datetime& other) const
+bool datetime::operator<=(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
@@ -863,7 +863,7 @@ const bool datetime::operator<=(const datetime& other) const
}
-const bool datetime::operator>(const datetime& other) const
+bool datetime::operator>(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
@@ -877,7 +877,7 @@ const bool datetime::operator>(const datetime& other) const
}
-const bool datetime::operator>=(const datetime& other) const
+bool datetime::operator>=(const datetime& other) const
{
const datetime ut1 = utility::datetimeUtils::toUniversalTime(*this);
const datetime ut2 = utility::datetimeUtils::toUniversalTime(other);
diff --git a/src/disposition.cpp b/src/disposition.cpp
index 673d7373..1b420fbc 100644
--- a/src/disposition.cpp
+++ b/src/disposition.cpp
@@ -150,7 +150,7 @@ void disposition::removeAllModifiers()
}
-const bool disposition::hasModifier(const string& modifier) const
+bool disposition::hasModifier(const string& modifier) const
{
const string modifierLC = utility::stringUtils::toLower(modifier);
diff --git a/src/emptyContentHandler.cpp b/src/emptyContentHandler.cpp
index 872b233e..bbee9864 100644
--- a/src/emptyContentHandler.cpp
+++ b/src/emptyContentHandler.cpp
@@ -72,19 +72,19 @@ void emptyContentHandler::extractRaw(utility::outputStream& /* os */,
}
-const string::size_type emptyContentHandler::getLength() const
+string::size_type emptyContentHandler::getLength() const
{
return (0);
}
-const bool emptyContentHandler::isEmpty() const
+bool emptyContentHandler::isEmpty() const
{
return (true);
}
-const bool emptyContentHandler::isEncoded() const
+bool emptyContentHandler::isEncoded() const
{
return (false);
}
diff --git a/src/encoderB64.cpp b/src/encoderB64.cpp
index 815d2278..2c16ee75 100644
--- a/src/encoderB64.cpp
+++ b/src/encoderB64.cpp
@@ -74,7 +74,7 @@ const unsigned char encoderB64::sm_decodeMap[256] =
-const utility::stream::size_type encoderB64::encode(utility::inputStream& in,
+utility::stream::size_type encoderB64::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@@ -189,7 +189,7 @@ const utility::stream::size_type encoderB64::encode(utility::inputStream& in,
}
-const utility::stream::size_type encoderB64::decode(utility::inputStream& in,
+utility::stream::size_type encoderB64::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
diff --git a/src/encoderDefault.cpp b/src/encoderDefault.cpp
index d79bc4c4..1f2ba859 100644
--- a/src/encoderDefault.cpp
+++ b/src/encoderDefault.cpp
@@ -33,7 +33,7 @@ encoderDefault::encoderDefault()
}
-const utility::stream::size_type encoderDefault::encode(utility::inputStream& in,
+utility::stream::size_type encoderDefault::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@@ -50,7 +50,7 @@ const utility::stream::size_type encoderDefault::encode(utility::inputStream& in
}
-const utility::stream::size_type encoderDefault::decode(utility::inputStream& in,
+utility::stream::size_type encoderDefault::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
diff --git a/src/encoderFactory.cpp b/src/encoderFactory.cpp
index 6d9d9e3c..605286be 100644
--- a/src/encoderFactory.cpp
+++ b/src/encoderFactory.cpp
@@ -81,7 +81,7 @@ const ref <const encoderFactory::registeredEncoder> encoderFactory::getEncoderBy
}
-const int encoderFactory::getEncoderCount() const
+int encoderFactory::getEncoderCount() const
{
return (m_encoders.size());
}
diff --git a/src/encoderQP.cpp b/src/encoderQP.cpp
index b9cb6238..95ca331c 100644
--- a/src/encoderQP.cpp
+++ b/src/encoderQP.cpp
@@ -89,7 +89,7 @@ const unsigned char encoderQP::sm_hexDecodeTable[256] =
#endif // VMIME_BUILDING_DOC
-const utility::stream::size_type encoderQP::encode(utility::inputStream& in,
+utility::stream::size_type encoderQP::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@@ -305,7 +305,7 @@ const utility::stream::size_type encoderQP::encode(utility::inputStream& in,
}
-const utility::stream::size_type encoderQP::decode(utility::inputStream& in,
+utility::stream::size_type encoderQP::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@@ -406,9 +406,8 @@ const utility::stream::size_type encoderQP::decode(utility::inputStream& in,
++inTotal;
- const unsigned char value =
- sm_hexDecodeTable[c] * 16
- + sm_hexDecodeTable[next];
+ const unsigned char value = static_cast <unsigned char>
+ (sm_hexDecodeTable[c] * 16 + sm_hexDecodeTable[next]);
outBuffer[outBufferPos++] = value;
}
diff --git a/src/encoderUUE.cpp b/src/encoderUUE.cpp
index 5aa2ffd0..ed54ffa7 100644
--- a/src/encoderUUE.cpp
+++ b/src/encoderUUE.cpp
@@ -51,19 +51,19 @@ const std::vector <string> encoderUUE::getAvailableProperties() const
// This is the character encoding function to make a character printable
-static inline const unsigned char UUENCODE(const unsigned char c)
+static inline unsigned char UUENCODE(const unsigned char c)
{
return ((c & 077) + ' ');
}
// Single character decoding
-static inline const unsigned char UUDECODE(const unsigned char c)
+static inline unsigned char UUDECODE(const unsigned char c)
{
return ((c - ' ') & 077);
}
-const utility::stream::size_type encoderUUE::encode(utility::inputStream& in,
+utility::stream::size_type encoderUUE::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@@ -142,7 +142,7 @@ const utility::stream::size_type encoderUUE::encode(utility::inputStream& in,
}
-const utility::stream::size_type encoderUUE::decode(utility::inputStream& in,
+utility::stream::size_type encoderUUE::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 3ab9194f..202dfe90 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -97,13 +97,13 @@ encoding& encoding::operator=(const string& name)
}
-const bool encoding::operator==(const encoding& value) const
+bool encoding::operator==(const encoding& value) const
{
return (utility::stringUtils::toLower(m_name) == value.m_name);
}
-const bool encoding::operator!=(const encoding& value) const
+bool encoding::operator!=(const encoding& value) const
{
return !(*this == value);
}
diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp
index da4d9c4c..20b80835 100644
--- a/src/fileAttachment.cpp
+++ b/src/fileAttachment.cpp
@@ -133,24 +133,24 @@ fileAttachment::fileInfo::~fileInfo()
delete (m_readDate);
}
-const bool fileAttachment::fileInfo::hasFilename() const { return (m_filename != NULL); }
+bool fileAttachment::fileInfo::hasFilename() const { return (m_filename != NULL); }
const string& fileAttachment::fileInfo::getFilename() const { return (*m_filename); }
void fileAttachment::fileInfo::setFilename(const string& name) { if (m_filename) { *m_filename = name; } else { m_filename = new string(name); } }
-const bool fileAttachment::fileInfo::hasCreationDate() const { return (m_creationDate != NULL); }
+bool fileAttachment::fileInfo::hasCreationDate() const { return (m_creationDate != NULL); }
const datetime& fileAttachment::fileInfo::getCreationDate() const { return (*m_creationDate); }
void fileAttachment::fileInfo::setCreationDate(const datetime& date) { if (m_creationDate) { *m_creationDate = date; } else { m_creationDate = new datetime(date); } }
-const bool fileAttachment::fileInfo::hasModificationDate() const { return (m_modifDate != NULL); }
+bool fileAttachment::fileInfo::hasModificationDate() const { return (m_modifDate != NULL); }
const datetime& fileAttachment::fileInfo::getModificationDate() const { return (*m_modifDate); }
void fileAttachment::fileInfo::setModificationDate(const datetime& date) { if (m_modifDate) { *m_modifDate = date; } else { m_modifDate = new datetime(date); } }
-const bool fileAttachment::fileInfo::hasReadDate() const { return (m_readDate != NULL); }
+bool fileAttachment::fileInfo::hasReadDate() const { return (m_readDate != NULL); }
const datetime& fileAttachment::fileInfo::getReadDate() const { return (*m_readDate); }
void fileAttachment::fileInfo::setReadDate(const datetime& date) { if (m_readDate) { *m_readDate = date; } else { m_readDate = new datetime(date); } }
-const bool fileAttachment::fileInfo::hasSize() const { return (m_size != NULL); }
-const unsigned int fileAttachment::fileInfo::getSize() const { return (*m_size); }
+bool fileAttachment::fileInfo::hasSize() const { return (m_size != NULL); }
+unsigned int fileAttachment::fileInfo::getSize() const { return (*m_size); }
void fileAttachment::fileInfo::setSize(const unsigned int& size) { if (m_size) { *m_size = size; } else { m_size = new unsigned int(size); } }
diff --git a/src/header.cpp b/src/header.cpp
index ac5816d4..78424b3e 100644
--- a/src/header.cpp
+++ b/src/header.cpp
@@ -143,7 +143,7 @@ header& header::operator=(const header& other)
}
-const bool header::hasField(const string& fieldName) const
+bool header::hasField(const string& fieldName) const
{
std::vector <ref <headerField> >::const_iterator pos =
std::find_if(m_fields.begin(), m_fields.end(),
@@ -193,7 +193,8 @@ ref <headerField> header::getField(const string& fieldName)
std::vector <ref <headerField> >::const_iterator pos = m_fields.begin();
const std::vector <ref <headerField> >::const_iterator end = m_fields.end();
- for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos);
+ while (pos != end && utility::stringUtils::toLower((*pos)->getName()) != name)
+ ++pos;
// If no field with this name can be found, create a new one
if (pos == end)
@@ -290,13 +291,13 @@ void header::removeAllFields(const string& fieldName)
}
-const int header::getFieldCount() const
+int header::getFieldCount() const
{
return (m_fields.size());
}
-const bool header::isEmpty() const
+bool header::isEmpty() const
{
return (m_fields.empty());
}
@@ -355,7 +356,7 @@ header::fieldHasName::fieldHasName(const string& name)
{
}
-const bool header::fieldHasName::operator() (const ref <const headerField>& field)
+bool header::fieldHasName::operator() (const ref <const headerField>& field)
{
return utility::stringUtils::toLower(field->getName()) == m_name;
}
@@ -366,7 +367,7 @@ header::fieldHasNotName::fieldHasNotName(const string& name)
{
}
-const bool header::fieldHasNotName::operator() (const ref <const headerField>& field)
+bool header::fieldHasNotName::operator() (const ref <const headerField>& field)
{
return utility::stringUtils::toLower(field->getName()) != m_name;
}
diff --git a/src/headerField.cpp b/src/headerField.cpp
index a2edd212..00577129 100644
--- a/src/headerField.cpp
+++ b/src/headerField.cpp
@@ -284,7 +284,7 @@ void headerField::setName(const string& name)
}
-const bool headerField::isCustom() const
+bool headerField::isCustom() const
{
return (m_name.length() > 2 && m_name[0] == 'X' && m_name[1] == '-');
}
diff --git a/src/htmlTextPart.cpp b/src/htmlTextPart.cpp
index 962ec5f7..a2875737 100644
--- a/src/htmlTextPart.cpp
+++ b/src/htmlTextPart.cpp
@@ -54,7 +54,7 @@ const mediaType htmlTextPart::getType() const
}
-const int htmlTextPart::getPartCount() const
+int htmlTextPart::getPartCount() const
{
return (m_plainText->isEmpty() ? 1 : 2);
}
@@ -382,7 +382,7 @@ void htmlTextPart::setText(ref <contentHandler> text)
}
-const int htmlTextPart::getObjectCount() const
+int htmlTextPart::getObjectCount() const
{
return m_objects.size();
}
@@ -409,7 +409,7 @@ const ref <const htmlTextPart::embeddedObject> htmlTextPart::findObject(const st
}
-const bool htmlTextPart::hasObject(const string& id_) const
+bool htmlTextPart::hasObject(const string& id_) const
{
const string id = cleanId(id_);
diff --git a/src/mailbox.cpp b/src/mailbox.cpp
index dfe55e09..b1ed7a28 100644
--- a/src/mailbox.cpp
+++ b/src/mailbox.cpp
@@ -165,7 +165,10 @@ void mailbox::parse(const string& buffer, const string::size_type position,
{
// Erase any space between display name and <address>
string::iterator q = name.end();
- for ( ; q != name.begin() && parserHelpers::isSpace(*(q - 1)) ; --q);
+
+ while (q != name.begin() && parserHelpers::isSpace(*(q - 1)))
+ --q;
+
name.erase(q, name.end());
break;
@@ -431,13 +434,13 @@ void mailbox::generate(utility::outputStream& os, const string::size_type maxLin
}
-const bool mailbox::operator==(const class mailbox& mailbox) const
+bool mailbox::operator==(const class mailbox& mailbox) const
{
return (m_name == mailbox.m_name && m_email == mailbox.m_email);
}
-const bool mailbox::operator!=(const class mailbox& mailbox) const
+bool mailbox::operator!=(const class mailbox& mailbox) const
{
return !(*this == mailbox);
}
@@ -465,7 +468,7 @@ ref <component>mailbox::clone() const
}
-const bool mailbox::isEmpty() const
+bool mailbox::isEmpty() const
{
return (m_email.empty());
}
@@ -478,7 +481,7 @@ void mailbox::clear()
}
-const bool mailbox::isGroup() const
+bool mailbox::isGroup() const
{
return (false);
}
diff --git a/src/mailboxGroup.cpp b/src/mailboxGroup.cpp
index de209eb1..ac7202cd 100644
--- a/src/mailboxGroup.cpp
+++ b/src/mailboxGroup.cpp
@@ -228,13 +228,13 @@ void mailboxGroup::setName(const text& name)
}
-const bool mailboxGroup::isGroup() const
+bool mailboxGroup::isGroup() const
{
return (true);
}
-const bool mailboxGroup::isEmpty() const
+bool mailboxGroup::isEmpty() const
{
return (m_list.empty());
}
@@ -308,7 +308,7 @@ void mailboxGroup::removeAllMailboxes()
}
-const int mailboxGroup::getMailboxCount() const
+int mailboxGroup::getMailboxCount() const
{
return (m_list.size());
}
diff --git a/src/mailboxList.cpp b/src/mailboxList.cpp
index 47bb386f..e9fe7f92 100644
--- a/src/mailboxList.cpp
+++ b/src/mailboxList.cpp
@@ -109,13 +109,13 @@ void mailboxList::removeAllMailboxes()
}
-const int mailboxList::getMailboxCount() const
+int mailboxList::getMailboxCount() const
{
return (m_list.getAddressCount());
}
-const bool mailboxList::isEmpty() const
+bool mailboxList::isEmpty() const
{
return (m_list.isEmpty());
}
diff --git a/src/mdn/MDNHelper.cpp b/src/mdn/MDNHelper.cpp
index f9419a3c..a4a4ee4f 100644
--- a/src/mdn/MDNHelper.cpp
+++ b/src/mdn/MDNHelper.cpp
@@ -72,7 +72,7 @@ const std::vector <sendableMDNInfos> MDNHelper::getPossibleMDNs(const ref <const
}
-const bool MDNHelper::isMDN(const ref <const message> msg)
+bool MDNHelper::isMDN(const ref <const message> msg)
{
const ref <const header> hdr = msg->getHeader();
@@ -111,7 +111,7 @@ receivedMDNInfos MDNHelper::getReceivedMDN(const ref <const message> msg)
}
-const bool MDNHelper::needConfirmation(const ref <const message> msg)
+bool MDNHelper::needConfirmation(const ref <const message> msg)
{
ref <const header> hdr = msg->getHeader();
diff --git a/src/mediaType.cpp b/src/mediaType.cpp
index 71acc2f2..569ccc38 100644
--- a/src/mediaType.cpp
+++ b/src/mediaType.cpp
@@ -105,13 +105,13 @@ void mediaType::generate(utility::outputStream& os, const string::size_type maxL
}
-const bool mediaType::operator==(const mediaType& type) const
+bool mediaType::operator==(const mediaType& type) const
{
return (m_type == type.m_type && m_subType == type.m_subType);
}
-const bool mediaType::operator!=(const mediaType& type) const
+bool mediaType::operator!=(const mediaType& type) const
{
return !(*this == type);
}
diff --git a/src/messageBuilder.cpp b/src/messageBuilder.cpp
index 1d2ba7c7..cef4f734 100644
--- a/src/messageBuilder.cpp
+++ b/src/messageBuilder.cpp
@@ -291,7 +291,7 @@ ref <attachment> messageBuilder::getAttachmentAt(const int pos)
}
-const int messageBuilder::getAttachmentCount() const
+int messageBuilder::getAttachmentCount() const
{
return (m_attach.size());
}
diff --git a/src/messageId.cpp b/src/messageId.cpp
index 72cda2a0..08a8e379 100644
--- a/src/messageId.cpp
+++ b/src/messageId.cpp
@@ -230,13 +230,13 @@ messageId messageId::generateId()
}
-const bool messageId::operator==(const messageId& mid) const
+bool messageId::operator==(const messageId& mid) const
{
return (m_left == mid.m_left && m_right == mid.m_right);
}
-const bool messageId::operator!=(const messageId& mid) const
+bool messageId::operator!=(const messageId& mid) const
{
return !(*this == mid);
}
diff --git a/src/messageIdSequence.cpp b/src/messageIdSequence.cpp
index c0337608..60113583 100644
--- a/src/messageIdSequence.cpp
+++ b/src/messageIdSequence.cpp
@@ -198,13 +198,13 @@ void messageIdSequence::removeAllMessageIds()
}
-const int messageIdSequence::getMessageIdCount() const
+int messageIdSequence::getMessageIdCount() const
{
return (m_list.size());
}
-const bool messageIdSequence::isEmpty() const
+bool messageIdSequence::isEmpty() const
{
return (m_list.empty());
}
diff --git a/src/messageParser.cpp b/src/messageParser.cpp
index 012be6c0..639ac5ff 100644
--- a/src/messageParser.cpp
+++ b/src/messageParser.cpp
@@ -279,7 +279,7 @@ const std::vector <ref <const attachment> > messageParser::getAttachmentList() c
}
-const int messageParser::getAttachmentCount() const
+int messageParser::getAttachmentCount() const
{
return (m_attach.size());
}
@@ -307,7 +307,7 @@ const std::vector <ref <const textPart> > messageParser::getTextPartList() const
}
-const int messageParser::getTextPartCount() const
+int messageParser::getTextPartCount() const
{
return (m_textParts.size());
}
diff --git a/src/misc/importanceHelper.cpp b/src/misc/importanceHelper.cpp
index ff4dc53b..763753c6 100644
--- a/src/misc/importanceHelper.cpp
+++ b/src/misc/importanceHelper.cpp
@@ -61,13 +61,13 @@ void importanceHelper::resetImportanceHeader(ref <header> hdr)
}
-const importanceHelper::Importance importanceHelper::getImportance(ref <const message> msg)
+importanceHelper::Importance importanceHelper::getImportance(ref <const message> msg)
{
return getImportanceHeader(msg->getHeader());
}
-const importanceHelper::Importance importanceHelper::getImportanceHeader(ref <const header> hdr)
+importanceHelper::Importance importanceHelper::getImportanceHeader(ref <const header> hdr)
{
// Try "X-Priority" field
try
diff --git a/src/net/defaultConnectionInfos.cpp b/src/net/defaultConnectionInfos.cpp
index 97d1a7f7..ee706a34 100644
--- a/src/net/defaultConnectionInfos.cpp
+++ b/src/net/defaultConnectionInfos.cpp
@@ -40,7 +40,7 @@ const string defaultConnectionInfos::getHost() const
}
-const port_t defaultConnectionInfos::getPort() const
+port_t defaultConnectionInfos::getPort() const
{
return m_port;
}
diff --git a/src/net/events.cpp b/src/net/events.cpp
index 69fbc336..a6674a79 100644
--- a/src/net/events.cpp
+++ b/src/net/events.cpp
@@ -46,7 +46,7 @@ messageCountEvent::messageCountEvent
ref <folder> messageCountEvent::getFolder() const { return (m_folder); }
-const messageCountEvent::Types messageCountEvent::getType() const { return (m_type); }
+messageCountEvent::Types messageCountEvent::getType() const { return (m_type); }
const std::vector <int>& messageCountEvent::getNumbers() const { return (m_nums); }
@@ -73,7 +73,7 @@ messageChangedEvent::messageChangedEvent
ref <folder> messageChangedEvent::getFolder() const { return (m_folder); }
-const messageChangedEvent::Types messageChangedEvent::getType() const { return (m_type); }
+messageChangedEvent::Types messageChangedEvent::getType() const { return (m_type); }
const std::vector <int>& messageChangedEvent::getNumbers() const { return (m_nums); }
@@ -96,7 +96,7 @@ folderEvent::folderEvent
ref <folder> folderEvent::getFolder() const { return (m_folder); }
-const folderEvent::Types folderEvent::getType() const { return (m_type); }
+folderEvent::Types folderEvent::getType() const { return (m_type); }
void folderEvent::dispatch(folderListener* listener) const
diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp
index 69ef337d..7c78b788 100644
--- a/src/net/imap/IMAPConnection.cpp
+++ b/src/net/imap/IMAPConnection.cpp
@@ -531,14 +531,14 @@ ref <security::authenticator> IMAPConnection::getAuthenticator()
}
-const bool IMAPConnection::isConnected() const
+bool IMAPConnection::isConnected() const
{
return (m_socket && m_socket->isConnected() &&
(m_state == STATE_AUTHENTICATED || m_state == STATE_SELECTED));
}
-const bool IMAPConnection::isSecuredConnection() const
+bool IMAPConnection::isSecuredConnection() const
{
return m_secured;
}
@@ -670,7 +670,7 @@ IMAPParser::response* IMAPConnection::readResponse(IMAPParser::literalHandler* l
}
-const IMAPConnection::ProtocolStates IMAPConnection::state() const
+IMAPConnection::ProtocolStates IMAPConnection::state() const
{
return (m_state);
}
@@ -681,7 +681,8 @@ void IMAPConnection::setState(const ProtocolStates state)
m_state = state;
}
-const char IMAPConnection::hierarchySeparator() const
+
+char IMAPConnection::hierarchySeparator() const
{
return (m_hierarchySeparator);
}
diff --git a/src/net/imap/IMAPFolder.cpp b/src/net/imap/IMAPFolder.cpp
index daf20918..2130211c 100644
--- a/src/net/imap/IMAPFolder.cpp
+++ b/src/net/imap/IMAPFolder.cpp
@@ -71,7 +71,7 @@ IMAPFolder::~IMAPFolder()
}
-const int IMAPFolder::getMode() const
+int IMAPFolder::getMode() const
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -80,7 +80,7 @@ const int IMAPFolder::getMode() const
}
-const int IMAPFolder::getType()
+int IMAPFolder::getType()
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -100,7 +100,7 @@ const int IMAPFolder::getType()
}
-const int IMAPFolder::getFlags()
+int IMAPFolder::getFlags()
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -412,7 +412,7 @@ void IMAPFolder::destroy()
}
-const bool IMAPFolder::exists()
+bool IMAPFolder::exists()
{
ref <IMAPStore> store = m_store.acquire();
@@ -423,7 +423,7 @@ const bool IMAPFolder::exists()
}
-const int IMAPFolder::testExistAndGetType()
+int IMAPFolder::testExistAndGetType()
{
m_type = TYPE_UNDEFINED;
@@ -495,7 +495,7 @@ const int IMAPFolder::testExistAndGetType()
}
-const bool IMAPFolder::isOpen() const
+bool IMAPFolder::isOpen() const
{
return (m_open);
}
@@ -548,7 +548,7 @@ std::vector <ref <message> > IMAPFolder::getMessages(const std::vector <int>& nu
}
-const int IMAPFolder::getMessageCount()
+int IMAPFolder::getMessageCount()
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -761,7 +761,7 @@ void IMAPFolder::fetchMessage(ref <message> msg, const int options)
}
-const int IMAPFolder::getFetchCapabilities() const
+int IMAPFolder::getFetchCapabilities() const
{
return (FETCH_ENVELOPE | FETCH_CONTENT_INFO | FETCH_STRUCTURE |
FETCH_FLAGS | FETCH_SIZE | FETCH_FULL_HEADER | FETCH_UID |
diff --git a/src/net/imap/IMAPMessage.cpp b/src/net/imap/IMAPMessage.cpp
index 8e4bcc40..90bebf39 100644
--- a/src/net/imap/IMAPMessage.cpp
+++ b/src/net/imap/IMAPMessage.cpp
@@ -30,6 +30,7 @@
#include <sstream>
#include <iterator>
+#include <typeinfo>
namespace vmime {
@@ -60,8 +61,8 @@ public:
ref <const IMAPpart> getParent() const { return m_parent.acquire(); }
const mediaType& getType() const { return (m_mediaType); }
- const int getSize() const { return (m_size); }
- const int getNumber() const { return (m_number); }
+ int getSize() const { return (m_size); }
+ int getNumber() const { return (m_number); }
ref <const header> getHeader() const
{
@@ -149,7 +150,7 @@ public:
return m_parts[x];
}
- const int getPartCount() const
+ int getPartCount() const
{
return m_parts.size();
}
@@ -299,7 +300,7 @@ void IMAPMessage::onFolderClosed()
}
-const int IMAPMessage::getNumber() const
+int IMAPMessage::getNumber() const
{
return (m_num);
}
@@ -311,7 +312,7 @@ const message::uid IMAPMessage::getUniqueId() const
}
-const int IMAPMessage::getSize() const
+int IMAPMessage::getSize() const
{
if (m_size == -1)
throw exceptions::unfetched_object();
@@ -320,13 +321,13 @@ const int IMAPMessage::getSize() const
}
-const bool IMAPMessage::isExpunged() const
+bool IMAPMessage::isExpunged() const
{
return (m_expunged);
}
-const int IMAPMessage::getFlags() const
+int IMAPMessage::getFlags() const
{
if (m_flags == FLAG_UNDEFINED)
throw exceptions::unfetched_object();
diff --git a/src/net/imap/IMAPStore.cpp b/src/net/imap/IMAPStore.cpp
index 53fa9e80..753adc65 100644
--- a/src/net/imap/IMAPStore.cpp
+++ b/src/net/imap/IMAPStore.cpp
@@ -91,7 +91,7 @@ ref <folder> IMAPStore::getFolder(const folder::path& path)
}
-const bool IMAPStore::isValidFolderName(const folder::path::component& /* name */) const
+bool IMAPStore::isValidFolderName(const folder::path::component& /* name */) const
{
return true;
}
@@ -117,19 +117,19 @@ void IMAPStore::connect()
}
-const bool IMAPStore::isConnected() const
+bool IMAPStore::isConnected() const
{
return (m_connection && m_connection->isConnected());
}
-const bool IMAPStore::isIMAPS() const
+bool IMAPStore::isIMAPS() const
{
return m_isIMAPS;
}
-const bool IMAPStore::isSecuredConnection() const
+bool IMAPStore::isSecuredConnection() const
{
if (m_connection == NULL)
return false;
@@ -203,7 +203,7 @@ void IMAPStore::unregisterFolder(IMAPFolder* folder)
}
-const int IMAPStore::getCapabilities() const
+int IMAPStore::getCapabilities() const
{
return (CAPABILITY_CREATE_FOLDER |
CAPABILITY_RENAME_FOLDER |
diff --git a/src/net/imap/IMAPTag.cpp b/src/net/imap/IMAPTag.cpp
index 87902c30..7b8ce3fc 100644
--- a/src/net/imap/IMAPTag.cpp
+++ b/src/net/imap/IMAPTag.cpp
@@ -74,7 +74,7 @@ const IMAPTag IMAPTag::operator++(int)
}
-const int IMAPTag::number() const
+int IMAPTag::number() const
{
return (m_number);
}
@@ -92,9 +92,9 @@ void IMAPTag::generate()
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
m_tag[0] = prefixChars[m_number / 1000];
- m_tag[1] = '0' + (m_number % 1000) / 100;
- m_tag[2] = '0' + (m_number % 100) / 10;
- m_tag[3] = '0' + (m_number % 10);
+ m_tag[1] = static_cast <char>('0' + (m_number % 1000) / 100);
+ m_tag[2] = static_cast <char>('0' + (m_number % 100) / 10);
+ m_tag[3] = static_cast <char>('0' + m_number % 10);
}
diff --git a/src/net/imap/IMAPUtils.cpp b/src/net/imap/IMAPUtils.cpp
index 98157ae8..18ca00cb 100644
--- a/src/net/imap/IMAPUtils.cpp
+++ b/src/net/imap/IMAPUtils.cpp
@@ -272,7 +272,7 @@ const string IMAPUtils::toModifiedUTF7
base64 = false;
}
- out += ch;
+ out += static_cast <string::value_type>(ch);
if (ch == '&')
out += '-';
@@ -358,7 +358,7 @@ const folder::path::component IMAPUtils::fromModifiedUTF7(const string& text)
}
-const int IMAPUtils::folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list)
+int IMAPUtils::folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list)
{
// Get folder type
int type = folder::TYPE_CONTAINS_MESSAGES | folder::TYPE_CONTAINS_FOLDERS;
@@ -378,7 +378,7 @@ const int IMAPUtils::folderTypeFromFlags(const IMAPParser::mailbox_flag_list* li
}
-const int IMAPUtils::folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list)
+int IMAPUtils::folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list)
{
// Get folder flags
int folderFlags = folder::FLAG_CHILDREN;
@@ -397,7 +397,7 @@ const int IMAPUtils::folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* l
}
-const int IMAPUtils::messageFlagsFromFlags(const IMAPParser::flag_list* list)
+int IMAPUtils::messageFlagsFromFlags(const IMAPParser::flag_list* list)
{
const std::vector <IMAPParser::flag*>& flagList = list->flags();
int flags = 0;
diff --git a/src/net/maildir/format/courierMaildirFormat.cpp b/src/net/maildir/format/courierMaildirFormat.cpp
index 82a3b188..1118c279 100644
--- a/src/net/maildir/format/courierMaildirFormat.cpp
+++ b/src/net/maildir/format/courierMaildirFormat.cpp
@@ -132,7 +132,7 @@ void courierMaildirFormat::renameFolderImpl
}
-const bool courierMaildirFormat::folderExists(const folder::path& path) const
+bool courierMaildirFormat::folderExists(const folder::path& path) const
{
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
@@ -164,7 +164,7 @@ const bool courierMaildirFormat::folderExists(const folder::path& path) const
}
-const bool courierMaildirFormat::folderHasSubfolders(const folder::path& path) const
+bool courierMaildirFormat::folderHasSubfolders(const folder::path& path) const
{
std::vector <string> dirs;
return listDirectories(path, dirs, true);
@@ -251,7 +251,7 @@ const std::vector <folder::path> courierMaildirFormat::listFolders
}
-const bool courierMaildirFormat::listDirectories(const folder::path& root,
+bool courierMaildirFormat::listDirectories(const folder::path& root,
std::vector <string>& dirs, const bool onlyTestForExistence) const
{
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
@@ -304,7 +304,7 @@ const bool courierMaildirFormat::listDirectories(const folder::path& root,
// static
-const bool courierMaildirFormat::isSubfolderDirectory(const utility::file& file)
+bool courierMaildirFormat::isSubfolderDirectory(const utility::file& file)
{
// A directory which names starts with '.' may be a subfolder
if (file.isDirectory() &&
@@ -494,7 +494,7 @@ const folder::path::component courierMaildirFormat::fromModifiedUTF7(const strin
}
-const bool courierMaildirFormat::supports() const
+bool courierMaildirFormat::supports() const
{
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
diff --git a/src/net/maildir/format/kmailMaildirFormat.cpp b/src/net/maildir/format/kmailMaildirFormat.cpp
index c6293ace..eeedd416 100644
--- a/src/net/maildir/format/kmailMaildirFormat.cpp
+++ b/src/net/maildir/format/kmailMaildirFormat.cpp
@@ -85,7 +85,7 @@ void kmailMaildirFormat::destroyFolder(const folder::path& path)
}
-const bool kmailMaildirFormat::folderExists(const folder::path& path) const
+bool kmailMaildirFormat::folderExists(const folder::path& path) const
{
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
@@ -210,7 +210,7 @@ void kmailMaildirFormat::listFoldersImpl
// static
-const bool kmailMaildirFormat::isSubfolderDirectory(const utility::file& file)
+bool kmailMaildirFormat::isSubfolderDirectory(const utility::file& file)
{
// A directory which name does not start with '.' is listed as a sub-folder
if (file.isDirectory() &&
@@ -275,7 +275,7 @@ void kmailMaildirFormat::renameFolder(const folder::path& oldPath, const folder:
}
-const bool kmailMaildirFormat::folderHasSubfolders(const folder::path& path) const
+bool kmailMaildirFormat::folderHasSubfolders(const folder::path& path) const
{
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
@@ -296,7 +296,7 @@ const bool kmailMaildirFormat::folderHasSubfolders(const folder::path& path) con
}
-const bool kmailMaildirFormat::supports() const
+bool kmailMaildirFormat::supports() const
{
// This is the default
return true;
diff --git a/src/net/maildir/maildirFolder.cpp b/src/net/maildir/maildirFolder.cpp
index 4f5903e2..4f0acaf3 100644
--- a/src/net/maildir/maildirFolder.cpp
+++ b/src/net/maildir/maildirFolder.cpp
@@ -74,7 +74,7 @@ void maildirFolder::onStoreDisconnected()
}
-const int maildirFolder::getMode() const
+int maildirFolder::getMode() const
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -83,7 +83,7 @@ const int maildirFolder::getMode() const
}
-const int maildirFolder::getType()
+int maildirFolder::getType()
{
if (m_path.isEmpty())
return (TYPE_CONTAINS_FOLDERS);
@@ -92,7 +92,7 @@ const int maildirFolder::getType()
}
-const int maildirFolder::getFlags()
+int maildirFolder::getFlags()
{
int flags = 0;
@@ -241,7 +241,7 @@ void maildirFolder::destroy()
}
-const bool maildirFolder::exists()
+bool maildirFolder::exists()
{
ref <maildirStore> store = m_store.acquire();
@@ -249,7 +249,7 @@ const bool maildirFolder::exists()
}
-const bool maildirFolder::isOpen() const
+bool maildirFolder::isOpen() const
{
return (m_open);
}
@@ -441,7 +441,7 @@ std::vector <ref <message> > maildirFolder::getMessages(const std::vector <int>&
}
-const int maildirFolder::getMessageCount()
+int maildirFolder::getMessageCount()
{
return (m_messageCount);
}
@@ -1339,7 +1339,7 @@ void maildirFolder::fetchMessage(ref <message> msg, const int options)
}
-const int maildirFolder::getFetchCapabilities() const
+int maildirFolder::getFetchCapabilities() const
{
return (FETCH_ENVELOPE | FETCH_STRUCTURE | FETCH_CONTENT_INFO |
FETCH_FLAGS | FETCH_SIZE | FETCH_FULL_HEADER | FETCH_UID |
diff --git a/src/net/maildir/maildirMessage.cpp b/src/net/maildir/maildirMessage.cpp
index 3ed42ba6..1ae83eed 100644
--- a/src/net/maildir/maildirMessage.cpp
+++ b/src/net/maildir/maildirMessage.cpp
@@ -57,8 +57,8 @@ public:
weak_ref <const maildirPart> getParent() const { return (m_parent); }
const mediaType& getType() const { return (m_mediaType); }
- const int getSize() const { return (m_size); }
- const int getNumber() const { return (m_number); }
+ int getSize() const { return (m_size); }
+ int getNumber() const { return (m_number); }
ref <const header> getHeader() const
{
@@ -76,11 +76,11 @@ public:
return (*(m_header = vmime::create <header>()));
}
- const int getHeaderParsedOffset() const { return (m_headerParsedOffset); }
- const int getHeaderParsedLength() const { return (m_headerParsedLength); }
+ int getHeaderParsedOffset() const { return (m_headerParsedOffset); }
+ int getHeaderParsedLength() const { return (m_headerParsedLength); }
- const int getBodyParsedOffset() const { return (m_bodyParsedOffset); }
- const int getBodyParsedLength() const { return (m_bodyParsedLength); }
+ int getBodyParsedOffset() const { return (m_bodyParsedOffset); }
+ int getBodyParsedLength() const { return (m_bodyParsedLength); }
void initStructure(const bodyPart& part);
@@ -145,7 +145,7 @@ public:
return m_parts[x];
}
- const int getPartCount() const
+ int getPartCount() const
{
return m_parts.size();
}
@@ -247,7 +247,7 @@ void maildirMessage::onFolderClosed()
}
-const int maildirMessage::getNumber() const
+int maildirMessage::getNumber() const
{
return (m_num);
}
@@ -259,7 +259,7 @@ const message::uid maildirMessage::getUniqueId() const
}
-const int maildirMessage::getSize() const
+int maildirMessage::getSize() const
{
if (m_size == -1)
throw exceptions::unfetched_object();
@@ -268,7 +268,7 @@ const int maildirMessage::getSize() const
}
-const bool maildirMessage::isExpunged() const
+bool maildirMessage::isExpunged() const
{
return (m_expunged);
}
@@ -301,7 +301,7 @@ ref <const header> maildirMessage::getHeader() const
}
-const int maildirMessage::getFlags() const
+int maildirMessage::getFlags() const
{
if (m_flags == FLAG_UNDEFINED)
throw exceptions::unfetched_object();
diff --git a/src/net/maildir/maildirStore.cpp b/src/net/maildir/maildirStore.cpp
index 746cd099..8e4e0029 100644
--- a/src/net/maildir/maildirStore.cpp
+++ b/src/net/maildir/maildirStore.cpp
@@ -104,7 +104,7 @@ ref <folder> maildirStore::getFolder(const folder::path& path)
}
-const bool maildirStore::isValidFolderName(const folder::path::component& name) const
+bool maildirStore::isValidFolderName(const folder::path::component& name) const
{
if (!platform::getHandler()->getFileSystemFactory()->isValidPathComponent(name))
return false;
@@ -157,13 +157,13 @@ void maildirStore::connect()
}
-const bool maildirStore::isConnected() const
+bool maildirStore::isConnected() const
{
return (m_connected);
}
-const bool maildirStore::isSecuredConnection() const
+bool maildirStore::isSecuredConnection() const
{
return false;
}
@@ -171,7 +171,7 @@ const bool maildirStore::isSecuredConnection() const
ref <connectionInfos> maildirStore::getConnectionInfos() const
{
- return vmime::create <defaultConnectionInfos>("localhost", 0);
+ return vmime::create <defaultConnectionInfos>("localhost", static_cast <port_t>(0));
}
@@ -226,7 +226,7 @@ const utility::path& maildirStore::getFileSystemPath() const
}
-const int maildirStore::getCapabilities() const
+int maildirStore::getCapabilities() const
{
return (CAPABILITY_CREATE_FOLDER |
CAPABILITY_RENAME_FOLDER |
diff --git a/src/net/maildir/maildirUtils.cpp b/src/net/maildir/maildirUtils.cpp
index cd688b08..67d52fe6 100644
--- a/src/net/maildir/maildirUtils.cpp
+++ b/src/net/maildir/maildirUtils.cpp
@@ -34,7 +34,7 @@ namespace net {
namespace maildir {
-const bool maildirUtils::isMessageFile(const utility::file& file)
+bool maildirUtils::isMessageFile(const utility::file& file)
{
// Ignore files which name begins with '.'
if (file.isFile() &&
@@ -77,7 +77,7 @@ const utility::file::path::component maildirUtils::extractId
}
-const int maildirUtils::extractFlags(const utility::file::path::component& comp)
+int maildirUtils::extractFlags(const utility::file::path::component& comp)
{
string::size_type sep = comp.getBuffer().rfind(':'); // try colon
@@ -208,7 +208,7 @@ maildirUtils::messageIdComparator::messageIdComparator
}
-const bool maildirUtils::messageIdComparator::operator()
+bool maildirUtils::messageIdComparator::operator()
(const utility::file::path::component& other) const
{
return (m_comp == maildirUtils::extractId(other));
diff --git a/src/net/message.cpp b/src/net/message.cpp
index f1a231a9..37f020b3 100644
--- a/src/net/message.cpp
+++ b/src/net/message.cpp
@@ -40,7 +40,7 @@ ref <part> part::getPartAt(const int pos)
}
-const int part::getPartCount() const
+int part::getPartCount() const
{
return getStructure()->getPartCount();
}
diff --git a/src/net/pop3/POP3Folder.cpp b/src/net/pop3/POP3Folder.cpp
index 0b20878d..ba70f2b1 100644
--- a/src/net/pop3/POP3Folder.cpp
+++ b/src/net/pop3/POP3Folder.cpp
@@ -63,7 +63,7 @@ POP3Folder::~POP3Folder()
}
-const int POP3Folder::getMode() const
+int POP3Folder::getMode() const
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -72,7 +72,7 @@ const int POP3Folder::getMode() const
}
-const int POP3Folder::getType()
+int POP3Folder::getType()
{
if (!isOpen())
throw exceptions::illegal_state("Folder not open");
@@ -86,7 +86,7 @@ const int POP3Folder::getType()
}
-const int POP3Folder::getFlags()
+int POP3Folder::getFlags()
{
return (0);
}
@@ -194,7 +194,7 @@ void POP3Folder::destroy()
}
-const bool POP3Folder::exists()
+bool POP3Folder::exists()
{
ref <POP3Store> store = m_store.acquire();
@@ -205,7 +205,7 @@ const bool POP3Folder::exists()
}
-const bool POP3Folder::isOpen() const
+bool POP3Folder::isOpen() const
{
return (m_open);
}
@@ -273,7 +273,7 @@ std::vector <ref <message> > POP3Folder::getMessages(const std::vector <int>& nu
}
-const int POP3Folder::getMessageCount()
+int POP3Folder::getMessageCount()
{
ref <POP3Store> store = m_store.acquire();
@@ -517,7 +517,7 @@ void POP3Folder::fetchMessage(ref <message> msg, const int options)
}
-const int POP3Folder::getFetchCapabilities() const
+int POP3Folder::getFetchCapabilities() const
{
return (FETCH_ENVELOPE | FETCH_CONTENT_INFO |
FETCH_SIZE | FETCH_FULL_HEADER | FETCH_UID |
diff --git a/src/net/pop3/POP3Message.cpp b/src/net/pop3/POP3Message.cpp
index ace7d7c8..6cdd4557 100644
--- a/src/net/pop3/POP3Message.cpp
+++ b/src/net/pop3/POP3Message.cpp
@@ -55,7 +55,7 @@ void POP3Message::onFolderClosed()
}
-const int POP3Message::getNumber() const
+int POP3Message::getNumber() const
{
return (m_num);
}
@@ -67,7 +67,7 @@ const message::uid POP3Message::getUniqueId() const
}
-const int POP3Message::getSize() const
+int POP3Message::getSize() const
{
if (m_size == -1)
throw exceptions::unfetched_object();
@@ -76,13 +76,13 @@ const int POP3Message::getSize() const
}
-const bool POP3Message::isExpunged() const
+bool POP3Message::isExpunged() const
{
return (false);
}
-const int POP3Message::getFlags() const
+int POP3Message::getFlags() const
{
int flags = FLAG_RECENT;
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp
index 08f3c40b..16a5dff4 100644
--- a/src/net/pop3/POP3Store.cpp
+++ b/src/net/pop3/POP3Store.cpp
@@ -119,7 +119,7 @@ ref <folder> POP3Store::getFolder(const folder::path& path)
}
-const bool POP3Store::isValidFolderName(const folder::path::component& /* name */) const
+bool POP3Store::isValidFolderName(const folder::path::component& /* name */) const
{
return true;
}
@@ -572,13 +572,13 @@ void POP3Store::startTLS()
#endif // VMIME_HAVE_TLS_SUPPORT
-const bool POP3Store::isConnected() const
+bool POP3Store::isConnected() const
{
return (m_socket && m_socket->isConnected() && m_authentified);
}
-const bool POP3Store::isSecuredConnection() const
+bool POP3Store::isSecuredConnection() const
{
return m_secured;
}
@@ -666,13 +666,13 @@ const std::vector <string> POP3Store::getCapabilities()
}
-const bool POP3Store::isSuccessResponse(const string& buffer)
+bool POP3Store::isSuccessResponse(const string& buffer)
{
return getResponseCode(buffer) == RESPONSE_OK;
}
-const bool POP3Store::stripFirstLine(const string& buffer, string& result, string* firstLine)
+bool POP3Store::stripFirstLine(const string& buffer, string& result, string* firstLine)
{
const string::size_type end = buffer.find('\n');
@@ -690,7 +690,7 @@ const bool POP3Store::stripFirstLine(const string& buffer, string& result, strin
}
-const int POP3Store::getResponseCode(const string& buffer)
+int POP3Store::getResponseCode(const string& buffer)
{
if (buffer.length() >= 2)
{
@@ -805,7 +805,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
}
last1 = receiveBuffer[receiveBuffer.length() - 1];
- last2 = (receiveBuffer.length() >= 2) ? receiveBuffer[receiveBuffer.length() - 2] : 0;
+ last2 = static_cast <char>((receiveBuffer.length() >= 2) ? receiveBuffer[receiveBuffer.length() - 2] : 0);
// Append the data to the response buffer
buffer += receiveBuffer;
@@ -926,7 +926,7 @@ void POP3Store::readResponse(utility::outputStream& os,
}
-const bool POP3Store::checkTerminator(string& buffer, const bool multiLine)
+bool POP3Store::checkTerminator(string& buffer, const bool multiLine)
{
// Multi-line response
if (multiLine)
@@ -951,7 +951,7 @@ const bool POP3Store::checkTerminator(string& buffer, const bool multiLine)
}
-const bool POP3Store::checkOneTerminator(string& buffer, const string& term)
+bool POP3Store::checkOneTerminator(string& buffer, const string& term)
{
if (buffer.length() >= term.length() &&
std::equal(buffer.end() - term.length(), buffer.end(), term.begin()))
@@ -977,7 +977,7 @@ void POP3Store::unregisterFolder(POP3Folder* folder)
}
-const int POP3Store::getCapabilities() const
+int POP3Store::getCapabilities() const
{
return (CAPABILITY_DELETE_MESSAGE);
}
diff --git a/src/net/sendmail/sendmailTransport.cpp b/src/net/sendmail/sendmailTransport.cpp
index fdd6e9ba..c1aded62 100644
--- a/src/net/sendmail/sendmailTransport.cpp
+++ b/src/net/sendmail/sendmailTransport.cpp
@@ -92,13 +92,13 @@ void sendmailTransport::connect()
}
-const bool sendmailTransport::isConnected() const
+bool sendmailTransport::isConnected() const
{
return (m_connected);
}
-const bool sendmailTransport::isSecuredConnection() const
+bool sendmailTransport::isSecuredConnection() const
{
return false;
}
@@ -106,7 +106,7 @@ const bool sendmailTransport::isSecuredConnection() const
ref <connectionInfos> sendmailTransport::getConnectionInfos() const
{
- return vmime::create <defaultConnectionInfos>("localhost", 0);
+ return vmime::create <defaultConnectionInfos>("localhost", static_cast <port_t>(0));
}
diff --git a/src/net/serviceFactory.cpp b/src/net/serviceFactory.cpp
index 49c6a50b..0abeeb39 100644
--- a/src/net/serviceFactory.cpp
+++ b/src/net/serviceFactory.cpp
@@ -100,7 +100,7 @@ ref <const serviceFactory::registeredService> serviceFactory::getServiceByProtoc
}
-const int serviceFactory::getServiceCount() const
+int serviceFactory::getServiceCount() const
{
return (m_services.size());
}
diff --git a/src/net/serviceInfos.cpp b/src/net/serviceInfos.cpp
index 01547a14..d6aee298 100644
--- a/src/net/serviceInfos.cpp
+++ b/src/net/serviceInfos.cpp
@@ -79,7 +79,7 @@ serviceInfos::~serviceInfos()
}
-const bool serviceInfos::hasProperty(ref <session> s, const property& p) const
+bool serviceInfos::hasProperty(ref <session> s, const property& p) const
{
return s->getProperties().hasProperty(getPropertyPrefix() + p.getName());
}
@@ -141,13 +141,13 @@ const string& serviceInfos::property::getDefaultValue() const
}
-const serviceInfos::property::Types serviceInfos::property::getType() const
+serviceInfos::property::Types serviceInfos::property::getType() const
{
return (m_type);
}
-const int serviceInfos::property::getFlags() const
+int serviceInfos::property::getFlags() const
{
return (m_flags);
}
diff --git a/src/net/serviceRegistration.inl b/src/net/serviceRegistration.inl
index 2d7f1888..75fa4358 100644
--- a/src/net/serviceRegistration.inl
+++ b/src/net/serviceRegistration.inl
@@ -58,7 +58,7 @@ public:
return (m_name);
}
- const int getType() const
+ int getType() const
{
return (m_type);
}
diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp
index 17d5d0c9..24301c57 100644
--- a/src/net/smtp/SMTPResponse.cpp
+++ b/src/net/smtp/SMTPResponse.cpp
@@ -49,7 +49,7 @@ SMTPResponse::SMTPResponse(const SMTPResponse&)
}
-const int SMTPResponse::getCode() const
+int SMTPResponse::getCode() const
{
const int firstCode = m_lines[0].getCode();
@@ -179,7 +179,7 @@ const SMTPResponse::responseLine SMTPResponse::getNextResponse()
// static
-const int SMTPResponse::extractResponseCode(const string& response)
+int SMTPResponse::extractResponseCode(const string& response)
{
int code = 0;
@@ -200,7 +200,7 @@ const SMTPResponse::responseLine SMTPResponse::getLineAt(const unsigned int pos)
}
-const unsigned int SMTPResponse::getLineCount() const
+unsigned int SMTPResponse::getLineCount() const
{
return m_lines.size();
}
@@ -227,7 +227,7 @@ void SMTPResponse::responseLine::setCode(const int code)
}
-const int SMTPResponse::responseLine::getCode() const
+int SMTPResponse::responseLine::getCode() const
{
return m_code;
}
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index e042bafd..0a2e5b9f 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -485,13 +485,13 @@ void SMTPTransport::startTLS()
#endif // VMIME_HAVE_TLS_SUPPORT
-const bool SMTPTransport::isConnected() const
+bool SMTPTransport::isConnected() const
{
return (m_socket && m_socket->isConnected() && m_authentified);
}
-const bool SMTPTransport::isSecuredConnection() const
+bool SMTPTransport::isSecuredConnection() const
{
return m_secured;
}
diff --git a/src/net/tls/TLSSecuredConnectionInfos.cpp b/src/net/tls/TLSSecuredConnectionInfos.cpp
index 01938171..55df5e20 100644
--- a/src/net/tls/TLSSecuredConnectionInfos.cpp
+++ b/src/net/tls/TLSSecuredConnectionInfos.cpp
@@ -45,7 +45,7 @@ const string TLSSecuredConnectionInfos::getHost() const
}
-const port_t TLSSecuredConnectionInfos::getPort() const
+port_t TLSSecuredConnectionInfos::getPort() const
{
return m_port;
}
diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp
index 65abb6d9..73af1da7 100644
--- a/src/net/tls/TLSSocket.cpp
+++ b/src/net/tls/TLSSocket.cpp
@@ -84,7 +84,7 @@ void TLSSocket::disconnect()
}
-const bool TLSSocket::isConnected() const
+bool TLSSocket::isConnected() const
{
return m_wrapped->isConnected() && m_connected;
}
@@ -103,7 +103,7 @@ void TLSSocket::send(const string& buffer)
}
-const int TLSSocket::receiveRaw(char* buffer, const int count)
+int TLSSocket::receiveRaw(char* buffer, const int count)
{
const ssize_t ret = gnutls_record_recv
(*m_session->m_gnutlsSession,
diff --git a/src/net/transport.cpp b/src/net/transport.cpp
index 3c8536ab..5db70d21 100644
--- a/src/net/transport.cpp
+++ b/src/net/transport.cpp
@@ -123,7 +123,7 @@ void transport::send(ref <vmime::message> msg, utility::progressListener* progre
}
-const transport::Type transport::getType() const
+transport::Type transport::getType() const
{
return (TYPE_TRANSPORT);
}
diff --git a/src/parameter.cpp b/src/parameter.cpp
index 0e2676f0..466df3d1 100644
--- a/src/parameter.cpp
+++ b/src/parameter.cpp
@@ -175,7 +175,7 @@ void parameter::parse(const std::vector <valueChunk>& chunks)
if (c == '%' && i + 2 < len)
{
- string::value_type v = 0;
+ unsigned int v = 0;
// First char
switch (chunk.data[i + 1])
@@ -209,7 +209,7 @@ void parameter::parse(const std::vector <valueChunk>& chunks)
break;
}
- value << v;
+ value << static_cast <string::value_type>(v);
i += 2; // skip next 2 chars
}
diff --git a/src/parameterizedHeaderField.cpp b/src/parameterizedHeaderField.cpp
index e4629b85..a45c6272 100644
--- a/src/parameterizedHeaderField.cpp
+++ b/src/parameterizedHeaderField.cpp
@@ -354,14 +354,14 @@ parameterizedHeaderField& parameterizedHeaderField::operator=(const parameterize
}
-const bool parameterizedHeaderField::hasParameter(const string& paramName) const
+bool parameterizedHeaderField::hasParameter(const string& paramName) const
{
const string name = utility::stringUtils::toLower(paramName);
std::vector <ref <parameter> >::const_iterator pos = m_params.begin();
const std::vector <ref <parameter> >::const_iterator end = m_params.end();
- for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos);
+ for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos) {}
return (pos != end);
}
@@ -375,7 +375,7 @@ ref <parameter> parameterizedHeaderField::findParameter(const string& paramName)
std::vector <ref <parameter> >::const_iterator pos = m_params.begin();
const std::vector <ref <parameter> >::const_iterator end = m_params.end();
- for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos);
+ for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos) {}
// No parameter with this name can be found
if (pos == end)
@@ -398,7 +398,7 @@ ref <parameter> parameterizedHeaderField::getParameter(const string& paramName)
std::vector <ref <parameter> >::const_iterator pos = m_params.begin();
const std::vector <ref <parameter> >::const_iterator end = m_params.end();
- for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos);
+ for ( ; pos != end && utility::stringUtils::toLower((*pos)->getName()) != name ; ++pos) {}
// If no parameter with this name can be found, create a new one
if (pos == end)
@@ -486,13 +486,13 @@ void parameterizedHeaderField::removeAllParameters()
}
-const int parameterizedHeaderField::getParameterCount() const
+int parameterizedHeaderField::getParameterCount() const
{
return (m_params.size());
}
-const bool parameterizedHeaderField::isEmpty() const
+bool parameterizedHeaderField::isEmpty() const
{
return (m_params.empty());
}
diff --git a/src/path.cpp b/src/path.cpp
index 39c44613..58167875 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -70,14 +70,14 @@ void path::setDomain(const string& domain)
}
-const bool path::operator==(const path& p) const
+bool path::operator==(const path& p) const
{
return (m_localPart == p.m_localPart &&
m_domain == p.m_domain);
}
-const bool path::operator!=(const path& p) const
+bool path::operator!=(const path& p) const
{
return (m_localPart != p.m_localPart ||
m_domain != p.m_domain);
diff --git a/src/plainTextPart.cpp b/src/plainTextPart.cpp
index fa794d24..dee3f397 100644
--- a/src/plainTextPart.cpp
+++ b/src/plainTextPart.cpp
@@ -51,7 +51,7 @@ const mediaType plainTextPart::getType() const
}
-const int plainTextPart::getPartCount() const
+int plainTextPart::getPartCount() const
{
return (1);
}
diff --git a/src/platforms/posix/posixChildProcess.cpp b/src/platforms/posix/posixChildProcess.cpp
index 6765c705..d1a0d910 100644
--- a/src/platforms/posix/posixChildProcess.cpp
+++ b/src/platforms/posix/posixChildProcess.cpp
@@ -145,7 +145,7 @@ public:
{
}
- const bool eof() const
+ bool eof() const
{
return (m_eof);
}
@@ -155,7 +155,7 @@ public:
// Do nothing: unsupported
}
- const size_type skip(const size_type count)
+ size_type skip(const size_type count)
{
// TODO: not tested
value_type buffer[4096];
@@ -178,7 +178,7 @@ public:
return static_cast <size_type>(bytesSkipped);
}
- const size_type read(value_type* const data, const size_type count)
+ size_type read(value_type* const data, const size_type count)
{
int bytesRead = 0;
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp
index 1056155e..4d063d4e 100644
--- a/src/platforms/posix/posixFile.cpp
+++ b/src/platforms/posix/posixFile.cpp
@@ -66,7 +66,7 @@ posixFileIterator::~posixFileIterator()
}
-const bool posixFileIterator::hasMoreElements() const
+bool posixFileIterator::hasMoreElements() const
{
return (m_dirEntry != NULL);
}
@@ -146,7 +146,7 @@ posixFileReaderInputStream::~posixFileReaderInputStream()
}
-const bool posixFileReaderInputStream::eof() const
+bool posixFileReaderInputStream::eof() const
{
return (m_eof);
}
@@ -158,7 +158,7 @@ void posixFileReaderInputStream::reset()
}
-const vmime::utility::stream::size_type posixFileReaderInputStream::read
+vmime::utility::stream::size_type posixFileReaderInputStream::read
(value_type* const data, const size_type count)
{
ssize_t c = 0;
@@ -173,7 +173,7 @@ const vmime::utility::stream::size_type posixFileReaderInputStream::read
}
-const vmime::utility::stream::size_type posixFileReaderInputStream::skip(const size_type count)
+vmime::utility::stream::size_type posixFileReaderInputStream::skip(const size_type count)
{
const off_t curPos = ::lseek(m_fd, 0, SEEK_CUR);
const off_t newPos = ::lseek(m_fd, count, SEEK_CUR);
@@ -254,21 +254,21 @@ void posixFile::createDirectory(const bool createAll)
}
-const bool posixFile::isFile() const
+bool posixFile::isFile() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 && S_ISREG(buf.st_mode));
}
-const bool posixFile::isDirectory() const
+bool posixFile::isDirectory() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 && S_ISDIR(buf.st_mode));
}
-const bool posixFile::canRead() const
+bool posixFile::canRead() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 &&
@@ -277,7 +277,7 @@ const bool posixFile::canRead() const
}
-const bool posixFile::canWrite() const
+bool posixFile::canWrite() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 &&
@@ -286,7 +286,7 @@ const bool posixFile::canWrite() const
}
-const posixFile::length_type posixFile::getLength()
+posixFile::length_type posixFile::getLength()
{
struct stat buf;
@@ -303,7 +303,7 @@ const posixFile::path& posixFile::getFullPath() const
}
-const bool posixFile::exists() const
+bool posixFile::exists() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0);
@@ -451,13 +451,13 @@ const vmime::string posixFileSystemFactory::pathToStringImpl(const vmime::utilit
}
-const bool posixFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
+bool posixFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
{
return (comp.getBuffer().find_first_of("/*") == vmime::string::npos);
}
-const bool posixFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
+bool posixFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
{
for (int i = 0 ; i < path.getSize() ; ++i)
{
diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp
index d1b782f7..94a5072f 100644
--- a/src/platforms/posix/posixHandler.cpp
+++ b/src/platforms/posix/posixHandler.cpp
@@ -70,7 +70,7 @@ posixHandler::~posixHandler()
}
-const unsigned int posixHandler::getUnixTime() const
+unsigned int posixHandler::getUnixTime() const
{
return ::time(NULL);
}
@@ -165,7 +165,7 @@ const vmime::string posixHandler::getHostName() const
}
-const unsigned int posixHandler::getProcessId() const
+unsigned int posixHandler::getProcessId() const
{
return (::getpid());
}
diff --git a/src/platforms/posix/posixSocket.cpp b/src/platforms/posix/posixSocket.cpp
index fe650803..4c2375c6 100644
--- a/src/platforms/posix/posixSocket.cpp
+++ b/src/platforms/posix/posixSocket.cpp
@@ -194,7 +194,7 @@ void posixSocket::connect(const vmime::string& address, const vmime::port_t port
}
-const bool posixSocket::isConnected() const
+bool posixSocket::isConnected() const
{
if (m_desc == -1)
return false;
@@ -224,7 +224,7 @@ void posixSocket::receive(vmime::string& buffer)
}
-const int posixSocket::receiveRaw(char* buffer, const int count)
+int posixSocket::receiveRaw(char* buffer, const int count)
{
const int ret = ::recv(m_desc, buffer, count, 0);
diff --git a/src/platforms/windows/windowsFile.cpp b/src/platforms/windows/windowsFile.cpp
index 56cd842e..c94076c5 100644
--- a/src/platforms/windows/windowsFile.cpp
+++ b/src/platforms/windows/windowsFile.cpp
@@ -94,12 +94,12 @@ const vmime::string windowsFileSystemFactory::pathToStringImpl(const vmime::util
return (native);
}
-const bool windowsFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
+bool windowsFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
{
return isValidPathComponent(comp, false);
}
-const bool windowsFileSystemFactory::isValidPathComponent(
+bool windowsFileSystemFactory::isValidPathComponent(
const vmime::utility::file::path::component& comp,
bool firstComponent) const
{
@@ -159,7 +159,7 @@ const bool windowsFileSystemFactory::isValidPathComponent(
}
-const bool windowsFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
+bool windowsFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
{
for (int i = 0 ; i < path.getSize() ; ++i)
{
@@ -220,7 +220,7 @@ void windowsFile::createDirectory(const bool createAll)
createDirectoryImpl(m_path, m_path, createAll);
}
-const bool windowsFile::isFile() const
+bool windowsFile::isFile() const
{
DWORD dwFileAttribute = GetFileAttributes(m_nativePath.c_str());
if (dwFileAttribute == INVALID_FILE_ATTRIBUTES)
@@ -228,7 +228,7 @@ const bool windowsFile::isFile() const
return (dwFileAttribute & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
-const bool windowsFile::isDirectory() const
+bool windowsFile::isDirectory() const
{
DWORD dwFileAttribute = GetFileAttributes(m_nativePath.c_str());
if (dwFileAttribute == INVALID_FILE_ATTRIBUTES)
@@ -236,7 +236,7 @@ const bool windowsFile::isDirectory() const
return (dwFileAttribute & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
}
-const bool windowsFile::canRead() const
+bool windowsFile::canRead() const
{
HANDLE hFile = CreateFile(
m_nativePath.c_str(),
@@ -252,7 +252,7 @@ const bool windowsFile::canRead() const
return true;
}
-const bool windowsFile::canWrite() const
+bool windowsFile::canWrite() const
{
HANDLE hFile = CreateFile(
m_nativePath.c_str(),
@@ -292,7 +292,7 @@ const vmime::utility::path& windowsFile::getFullPath() const
return m_path;
}
-const bool windowsFile::exists() const
+bool windowsFile::exists() const
{
WIN32_FIND_DATA findData;
HANDLE hFind = FindFirstFile(m_nativePath.c_str(), &findData);
@@ -372,7 +372,7 @@ windowsFileIterator::~windowsFileIterator()
FindClose(m_hFind);
}
-const bool windowsFileIterator::hasMoreElements() const
+bool windowsFileIterator::hasMoreElements() const
{
return m_moreElements;
}
@@ -452,7 +452,7 @@ windowsFileReaderInputStream::~windowsFileReaderInputStream()
CloseHandle(m_hFile);
}
-const bool windowsFileReaderInputStream::eof() const
+bool windowsFileReaderInputStream::eof() const
{
DWORD dwSize = GetFileSize(m_hFile, NULL);
DWORD dwPosition = SetFilePointer(m_hFile, 0, NULL, FILE_CURRENT);
diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp
index 0aeb9c91..58b1ae9c 100644
--- a/src/platforms/windows/windowsHandler.cpp
+++ b/src/platforms/windows/windowsHandler.cpp
@@ -64,7 +64,7 @@ windowsHandler::~windowsHandler()
}
-const unsigned int windowsHandler::getUnixTime() const
+unsigned int windowsHandler::getUnixTime() const
{
return static_cast <unsigned int>(::time(NULL));
}
@@ -232,7 +232,7 @@ const vmime::string windowsHandler::getHostName() const
}
-const unsigned int windowsHandler::getProcessId() const
+unsigned int windowsHandler::getProcessId() const
{
return (static_cast <unsigned int>(::GetCurrentProcessId()));
}
diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp
index feb4dda4..9450efc6 100644
--- a/src/platforms/windows/windowsSocket.cpp
+++ b/src/platforms/windows/windowsSocket.cpp
@@ -103,7 +103,7 @@ void windowsSocket::connect(const vmime::string& address, const vmime::port_t po
}
-const bool windowsSocket::isConnected() const
+bool windowsSocket::isConnected() const
{
return (m_desc != -1);
}
@@ -137,7 +137,7 @@ void windowsSocket::receive(vmime::string& buffer)
}
-const int windowsSocket::receiveRaw(char* buffer, const int count)
+int windowsSocket::receiveRaw(char* buffer, const int count)
{
int ret = ::recv(m_desc, buffer, count, 0);
diff --git a/src/propertySet.cpp b/src/propertySet.cpp
index 437468e7..c980d96d 100644
--- a/src/propertySet.cpp
+++ b/src/propertySet.cpp
@@ -95,7 +95,7 @@ void propertySet::parse(const string& props)
for ( ; pos != end ; )
{
// Skip white-spaces
- for ( ; pos != end && parserHelpers::isSpace(*pos) ; ++pos);
+ for ( ; pos != end && parserHelpers::isSpace(*pos) ; ++pos) {}
if (pos != end)
{
@@ -108,11 +108,11 @@ void propertySet::parse(const string& props)
// Extract the property name
const string::const_iterator optStart = pos;
- for ( ; pos != end && *pos != '=' ; ++pos);
+ for ( ; pos != end && *pos != '=' ; ++pos) {}
string::const_iterator optEnd = pos;
- for ( ; optEnd != optStart && parserHelpers::isSpace(*(optEnd - 1)) ; --optEnd);
+ for ( ; optEnd != optStart && parserHelpers::isSpace(*(optEnd - 1)) ; --optEnd) {}
const string option(optStart, optEnd);
string value = "1";
@@ -122,7 +122,7 @@ void propertySet::parse(const string& props)
++pos; // skip '='
// Extract the value
- for ( ; pos != end && parserHelpers::isSpace(*pos) ; ++pos);
+ for ( ; pos != end && parserHelpers::isSpace(*pos) ; ++pos) {}
if (pos != end)
{
@@ -161,13 +161,13 @@ void propertySet::parse(const string& props)
{
const string::const_iterator valStart = pos;
- for ( ; pos != end && !parserHelpers::isSpace(*pos) ; ++pos);
+ for ( ; pos != end && !parserHelpers::isSpace(*pos) ; ++pos) {}
value = string(valStart, pos);
}
// Advance to the next ';'
- for ( ; pos != end && (*pos != ';') ; ++pos);
+ for ( ; pos != end && (*pos != ';') ; ++pos) {}
if (pos != end)
++pos; // skip ';'
@@ -219,7 +219,7 @@ const propertySet::constPropertyProxy propertySet::operator[](const string& name
}
-const bool propertySet::hasProperty(const string& name) const
+bool propertySet::hasProperty(const string& name) const
{
return (find(name) != NULL);
}
@@ -304,14 +304,14 @@ void propertySet::property::setValue(const bool& value)
template <>
-const string propertySet::property::getValue() const
+string propertySet::property::getValue() const
{
return (m_value);
}
template <>
-const bool propertySet::property::getValue() const
+bool propertySet::property::getValue() const
{
if (utility::stringUtils::toLower(m_value) == "true")
return true;
@@ -332,21 +332,21 @@ const bool propertySet::property::getValue() const
template <>
-const string propertySet::valueFromString(const string& value)
+string propertySet::valueFromString(const string& value)
{
return value;
}
template <>
-const string propertySet::valueToString(const string& value)
+string propertySet::valueToString(const string& value)
{
return value;
}
template <>
-const bool propertySet::valueFromString(const string& value)
+bool propertySet::valueFromString(const string& value)
{
if (utility::stringUtils::toLower(value) == "true")
return true;
@@ -365,7 +365,7 @@ const bool propertySet::valueFromString(const string& value)
template <>
-const string propertySet::valueToString(const bool& value)
+string propertySet::valueToString(const bool& value)
{
return (value ? "true" : "false");
}
diff --git a/src/relay.cpp b/src/relay.cpp
index 430bc204..b86ea143 100644
--- a/src/relay.cpp
+++ b/src/relay.cpp
@@ -100,7 +100,7 @@ void relay::parse(const string& buffer, const string::size_type position,
{
Parts newPart = Part_None;
- if (cont = ((iss >> word) != 0))
+ if ((cont = ((iss >> word) != 0)))
{
// A little hack for handling comments
if (inComment)
diff --git a/src/security/cert/X509Certificate.cpp b/src/security/cert/X509Certificate.cpp
index be8f0f4e..ac1f7e04 100644
--- a/src/security/cert/X509Certificate.cpp
+++ b/src/security/cert/X509Certificate.cpp
@@ -147,15 +147,14 @@ const byteArray X509Certificate::getSerialNumber() const
}
-const bool X509Certificate::checkIssuer
- (ref <const X509Certificate> issuer) const
+bool X509Certificate::checkIssuer(ref <const X509Certificate> issuer) const
{
return (gnutls_x509_crt_check_issuer
(m_data->cert, issuer->m_data->cert) >= 1);
}
-const bool X509Certificate::verify(ref <const X509Certificate> caCert) const
+bool X509Certificate::verify(ref <const X509Certificate> caCert) const
{
unsigned int verify = 0;
@@ -236,13 +235,13 @@ const string X509Certificate::getType() const
}
-const int X509Certificate::getVersion() const
+int X509Certificate::getVersion() const
{
return gnutls_x509_crt_get_version(m_data->cert);
}
-const bool X509Certificate::equals(ref <const certificate> other) const
+bool X509Certificate::equals(ref <const certificate> other) const
{
ref <const X509Certificate> otherX509 =
other.dynamicCast <const X509Certificate>();
diff --git a/src/security/cert/certificateChain.cpp b/src/security/cert/certificateChain.cpp
index b2e2a065..0425d003 100644
--- a/src/security/cert/certificateChain.cpp
+++ b/src/security/cert/certificateChain.cpp
@@ -35,7 +35,7 @@ certificateChain::certificateChain(const std::vector <ref <certificate> >& certs
}
-const unsigned int certificateChain::getCount() const
+unsigned int certificateChain::getCount() const
{
return static_cast <unsigned int>(m_certs.size());
}
diff --git a/src/security/digest/md5/md5MessageDigest.cpp b/src/security/digest/md5/md5MessageDigest.cpp
index ac3773d5..d83908fe 100644
--- a/src/security/digest/md5/md5MessageDigest.cpp
+++ b/src/security/digest/md5/md5MessageDigest.cpp
@@ -50,6 +50,8 @@
#include "vmime/security/digest/md5/md5MessageDigest.hpp"
+#include <cstring>
+
namespace vmime {
namespace security {
@@ -327,7 +329,7 @@ void md5MessageDigest::transform()
}
-const int md5MessageDigest::getDigestLength() const
+int md5MessageDigest::getDigestLength() const
{
return 16;
}
diff --git a/src/security/digest/sha1/sha1MessageDigest.cpp b/src/security/digest/sha1/sha1MessageDigest.cpp
index b86cb996..a51e250d 100644
--- a/src/security/digest/sha1/sha1MessageDigest.cpp
+++ b/src/security/digest/sha1/sha1MessageDigest.cpp
@@ -26,6 +26,8 @@
#include "vmime/security/digest/sha1/sha1MessageDigest.hpp"
+#include <cstring>
+
namespace vmime {
namespace security {
@@ -126,7 +128,7 @@ void sha1MessageDigest::update(const byte_t* buffer, const unsigned long len)
i = 0;
}
- memcpy(&m_buffer[j], &buffer[i], len - i);
+ std::memcpy(&m_buffer[j], &buffer[i], len - i);
}
@@ -158,10 +160,10 @@ void sha1MessageDigest::finalize()
// Wipe variables
i = j = 0;
- memset(m_buffer, 0, 64);
- memset(m_state, 0, 20);
- memset(m_count, 0, 8);
- memset(&finalcount, 0, 8);
+ std::memset(m_buffer, 0, 64);
+ std::memset(m_state, 0, 20);
+ std::memset(m_count, 0, 8);
+ std::memset(&finalcount, 0, 8);
}
@@ -246,7 +248,7 @@ void sha1MessageDigest::transform
}
-const int sha1MessageDigest::getDigestLength() const
+int sha1MessageDigest::getDigestLength() const
{
return 20;
}
diff --git a/src/security/sasl/SASLMechanismFactory.cpp b/src/security/sasl/SASLMechanismFactory.cpp
index 37858199..a866e0cf 100644
--- a/src/security/sasl/SASLMechanismFactory.cpp
+++ b/src/security/sasl/SASLMechanismFactory.cpp
@@ -115,14 +115,14 @@ const std::vector <string> SASLMechanismFactory::getSupportedMechanisms() const
}
}
- free(out);
+ gsasl_free(out);
}
return list;
}
-const bool SASLMechanismFactory::isMechanismSupported(const string& name) const
+bool SASLMechanismFactory::isMechanismSupported(const string& name) const
{
return (gsasl_client_support_p(m_gsaslContext, name.c_str()) != 0 ||
m_mechs.find(name) != m_mechs.end());
diff --git a/src/security/sasl/SASLSession.cpp b/src/security/sasl/SASLSession.cpp
index 01da8ee9..f7f80f59 100644
--- a/src/security/sasl/SASLSession.cpp
+++ b/src/security/sasl/SASLSession.cpp
@@ -92,7 +92,7 @@ ref <SASLContext> SASLSession::getContext()
}
-const bool SASLSession::evaluateChallenge
+bool SASLSession::evaluateChallenge
(const byte_t* challenge, const int challengeLen,
byte_t** response, int* responseLen)
{
diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp
index 50c31e1b..5f86aed5 100644
--- a/src/security/sasl/SASLSocket.cpp
+++ b/src/security/sasl/SASLSocket.cpp
@@ -63,7 +63,7 @@ void SASLSocket::disconnect()
}
-const bool SASLSocket::isConnected() const
+bool SASLSocket::isConnected() const
{
return m_wrapped->isConnected();
}
@@ -77,7 +77,7 @@ void SASLSocket::receive(string& buffer)
}
-const int SASLSocket::receiveRaw(char* buffer, const int count)
+int SASLSocket::receiveRaw(char* buffer, const int count)
{
if (m_pendingLen != 0)
{
diff --git a/src/security/sasl/builtinSASLMechanism.cpp b/src/security/sasl/builtinSASLMechanism.cpp
index 168b34cb..1c958311 100644
--- a/src/security/sasl/builtinSASLMechanism.cpp
+++ b/src/security/sasl/builtinSASLMechanism.cpp
@@ -56,7 +56,7 @@ const string builtinSASLMechanism::getName() const
}
-const bool builtinSASLMechanism::step
+bool builtinSASLMechanism::step
(ref <SASLSession> sess, const byte_t* challenge, const int challengeLen,
byte_t** response, int* responseLen)
{
@@ -77,7 +77,7 @@ const bool builtinSASLMechanism::step
*response = res;
*responseLen = outputLen;
- free(output);
+ gsasl_free(output);
}
else
{
@@ -108,7 +108,7 @@ const bool builtinSASLMechanism::step
}
-const bool builtinSASLMechanism::isComplete() const
+bool builtinSASLMechanism::isComplete() const
{
return m_complete;
}
@@ -139,11 +139,11 @@ void builtinSASLMechanism::encode
}
catch (...)
{
- free(coutput);
+ gsasl_free(coutput);
throw;
}
- free(coutput);
+ gsasl_free(coutput);
}
@@ -172,11 +172,11 @@ void builtinSASLMechanism::decode
}
catch (...)
{
- free(coutput);
+ gsasl_free(coutput);
throw;
}
- free(coutput);
+ gsasl_free(coutput);
}
diff --git a/src/streamContentHandler.cpp b/src/streamContentHandler.cpp
index 8fe2ba14..386b0e17 100644
--- a/src/streamContentHandler.cpp
+++ b/src/streamContentHandler.cpp
@@ -177,19 +177,19 @@ void streamContentHandler::extractRaw(utility::outputStream& os,
}
-const string::size_type streamContentHandler::getLength() const
+string::size_type streamContentHandler::getLength() const
{
return (m_length);
}
-const bool streamContentHandler::isEmpty() const
+bool streamContentHandler::isEmpty() const
{
return (m_length == 0 || !m_stream);
}
-const bool streamContentHandler::isEncoded() const
+bool streamContentHandler::isEncoded() const
{
return (m_encoding != NO_ENCODING);
}
diff --git a/src/stringContentHandler.cpp b/src/stringContentHandler.cpp
index ad5f178c..6dd2719b 100644
--- a/src/stringContentHandler.cpp
+++ b/src/stringContentHandler.cpp
@@ -178,19 +178,19 @@ void stringContentHandler::extractRaw(utility::outputStream& os,
}
-const string::size_type stringContentHandler::getLength() const
+string::size_type stringContentHandler::getLength() const
{
return (m_string.length());
}
-const bool stringContentHandler::isEmpty() const
+bool stringContentHandler::isEmpty() const
{
return (m_string.length() == 0);
}
-const bool stringContentHandler::isEncoded() const
+bool stringContentHandler::isEncoded() const
{
return (m_encoding != NO_ENCODING);
}
diff --git a/src/text.cpp b/src/text.cpp
index 13a682ef..2c811c42 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -131,7 +131,7 @@ text& text::operator=(const text& other)
}
-const bool text::operator==(const text& t) const
+bool text::operator==(const text& t) const
{
if (getWordCount() == t.getWordCount())
{
@@ -150,7 +150,7 @@ const bool text::operator==(const text& t) const
}
-const bool text::operator!=(const text& t) const
+bool text::operator!=(const text& t) const
{
return !(*this == t);
}
@@ -199,13 +199,13 @@ void text::removeAllWords()
}
-const int text::getWordCount() const
+int text::getWordCount() const
{
return (m_words.size());
}
-const bool text::isEmpty() const
+bool text::isEmpty() const
{
return (m_words.empty());
}
diff --git a/src/utility/datetimeUtils.cpp b/src/utility/datetimeUtils.cpp
index 0a59d858..ed9fb4bf 100644
--- a/src/utility/datetimeUtils.cpp
+++ b/src/utility/datetimeUtils.cpp
@@ -206,14 +206,14 @@ const datetime datetimeUtils::toLocalTime(const datetime& date, const int zone)
}
-const bool datetimeUtils::isLeapYear(const int year)
+bool datetimeUtils::isLeapYear(const int year)
{
// From RFC 3339 - Appendix C. Leap Years:
return ((year % 4) == 0 && (year % 100 != 0 || year % 400 == 0));
}
-const int datetimeUtils::getDaysInMonth(const int year, const int month)
+int datetimeUtils::getDaysInMonth(const int year, const int month)
{
static const int daysInMonth[12] =
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
@@ -227,7 +227,7 @@ const int datetimeUtils::getDaysInMonth(const int year, const int month)
}
-const int datetimeUtils::getDayOfWeek(const int year, const int month, const int day)
+int datetimeUtils::getDayOfWeek(const int year, const int month, const int day)
{
int y = year;
int m = month;
@@ -256,7 +256,7 @@ const int datetimeUtils::getDayOfWeek(const int year, const int month, const int
}
-const int datetimeUtils::getWeekOfYear(const int year, const int month, const int day)
+int datetimeUtils::getWeekOfYear(const int year, const int month, const int day)
{
// Algorithm from http://personal.ecu.edu/mccartyr/ISOwdALG.txt
diff --git a/src/utility/filteredStream.cpp b/src/utility/filteredStream.cpp
index 74f6a1e8..eda0c64c 100644
--- a/src/utility/filteredStream.cpp
+++ b/src/utility/filteredStream.cpp
@@ -44,7 +44,7 @@ inputStream& dotFilteredInputStream::getPreviousInputStream()
}
-const bool dotFilteredInputStream::eof() const
+bool dotFilteredInputStream::eof() const
{
return (m_stream.eof());
}
@@ -59,7 +59,7 @@ void dotFilteredInputStream::reset()
}
-const stream::size_type dotFilteredInputStream::read(value_type* const data, const size_type count)
+stream::size_type dotFilteredInputStream::read(value_type* const data, const size_type count)
{
const stream::size_type read = m_stream.read(data, count);
@@ -111,7 +111,7 @@ const stream::size_type dotFilteredInputStream::read(value_type* const data, con
}
-const stream::size_type dotFilteredInputStream::skip(const size_type /* count */)
+stream::size_type dotFilteredInputStream::skip(const size_type /* count */)
{
// Skipping bytes is not supported
return 0;
@@ -250,7 +250,7 @@ void CRLFToLFFilteredOutputStream::flush()
// stopSequenceFilteredInputStream <1>
template <>
-const stream::size_type stopSequenceFilteredInputStream <1>::read
+stream::size_type stopSequenceFilteredInputStream <1>::read
(value_type* const data, const size_type count)
{
if (eof() || m_stream.eof())
diff --git a/src/utility/path.cpp b/src/utility/path.cpp
index eac1e6b1..053e612c 100644
--- a/src/utility/path.cpp
+++ b/src/utility/path.cpp
@@ -123,7 +123,7 @@ path& path::operator=(const component& c)
}
-const bool path::operator==(const path& p) const
+bool path::operator==(const path& p) const
{
if (m_list.size() != p.m_list.size())
return (false);
@@ -141,19 +141,19 @@ const bool path::operator==(const path& p) const
}
-const bool path::operator!=(const path& p) const
+bool path::operator!=(const path& p) const
{
return (!(*this == p));
}
-const bool path::isEmpty() const
+bool path::isEmpty() const
{
return (m_list.empty());
}
-const bool path::isRoot() const
+bool path::isRoot() const
{
return (m_list.empty());
}
@@ -171,7 +171,7 @@ path::component& path::getLastComponent()
}
-const int path::getSize() const
+int path::getSize() const
{
return (m_list.size());
}
@@ -189,7 +189,7 @@ path::component& path::operator[](const int x)
}
-const bool path::isDirectParentOf(const path& p) const
+bool path::isDirectParentOf(const path& p) const
{
if (p.getSize() != getSize() + 1)
return (false);
@@ -203,7 +203,7 @@ const bool path::isDirectParentOf(const path& p) const
}
-const bool path::isParentOf(const path& p) const
+bool path::isParentOf(const path& p) const
{
if (p.getSize() < getSize() + 1)
return (false);
diff --git a/src/utility/progressListener.cpp b/src/utility/progressListener.cpp
index 5d3b7834..c7babcbb 100644
--- a/src/utility/progressListener.cpp
+++ b/src/utility/progressListener.cpp
@@ -37,7 +37,7 @@ progressListenerSizeAdapter::progressListenerSizeAdapter
}
-const bool progressListenerSizeAdapter::cancel() const
+bool progressListenerSizeAdapter::cancel() const
{
return (m_wrapped ? m_wrapped->cancel() : false);
}
diff --git a/src/utility/random.cpp b/src/utility/random.cpp
index 41a94f81..2e373bb3 100644
--- a/src/utility/random.cpp
+++ b/src/utility/random.cpp
@@ -34,7 +34,7 @@ namespace utility {
unsigned int random::m_next(static_cast<unsigned int>(::std::time(NULL)));
-const unsigned int random::getNext()
+unsigned int random::getNext()
{
// Park and Miller's minimal standard generator:
// xn+1 = (a * xn + b) mod c
@@ -44,13 +44,13 @@ const unsigned int random::getNext()
}
-const unsigned int random::getTime()
+unsigned int random::getTime()
{
return (platform::getHandler()->getUnixTime());
}
-const unsigned int random::getProcess()
+unsigned int random::getProcess()
{
return (platform::getHandler()->getProcessId());
}
diff --git a/src/utility/smartPtrInt.cpp b/src/utility/smartPtrInt.cpp
index 9bebe977..4b4ce130 100644
--- a/src/utility/smartPtrInt.cpp
+++ b/src/utility/smartPtrInt.cpp
@@ -57,7 +57,7 @@ refManagerImpl::~refManagerImpl()
}
-const bool refManagerImpl::addStrong()
+bool refManagerImpl::addStrong()
{
if (m_strongCount <= 0)
return false;
@@ -118,13 +118,13 @@ void refManagerImpl::deleteObject()
}
-const long refManagerImpl::getStrongRefCount() const
+long refManagerImpl::getStrongRefCount() const
{
return m_strongCount;
}
-const long refManagerImpl::getWeakRefCount() const
+long refManagerImpl::getWeakRefCount() const
{
return m_weakCount;
}
@@ -149,13 +149,13 @@ refCounter::~refCounter()
}
-const long refCounter::increment()
+long refCounter::increment()
{
return InterlockedIncrement(&m_value);
}
-const long refCounter::decrement()
+long refCounter::decrement()
{
return InterlockedDecrement(&m_value);
}
@@ -181,7 +181,7 @@ refCounter::~refCounter()
}
-const long refCounter::increment()
+long refCounter::increment()
{
#if __GNUC_MINOR__ < 4 && __GNUC__ < 4
return __exchange_and_add(&m_value, 1) + 1;
@@ -191,7 +191,7 @@ const long refCounter::increment()
}
-const long refCounter::decrement()
+long refCounter::decrement()
{
#if __GNUC_MINOR__ < 4 && __GNUC__ < 4
return __exchange_and_add(&m_value, -1) - 1;
@@ -231,7 +231,7 @@ refCounter::~refCounter()
}
-const long refCounter::increment()
+long refCounter::increment()
{
long value;
@@ -243,7 +243,7 @@ const long refCounter::increment()
}
-const long refCounter::decrement()
+long refCounter::decrement()
{
long value;
@@ -275,13 +275,13 @@ refCounter::~refCounter()
}
-const long refCounter::increment()
+long refCounter::increment()
{
return ++m_value;
}
-const long refCounter::decrement()
+long refCounter::decrement()
{
return --m_value;
}
diff --git a/src/utility/stream.cpp b/src/utility/stream.cpp
index 9b402e6a..bb5300ef 100644
--- a/src/utility/stream.cpp
+++ b/src/utility/stream.cpp
@@ -38,7 +38,7 @@ namespace utility {
// stream
-const stream::size_type stream::getBlockSize() const
+stream::size_type stream::getBlockSize() const
{
return 32768; // 32 KB
}
@@ -60,13 +60,13 @@ outputStream& operator<<(outputStream& os, const string& str)
}
-const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os)
+stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os)
{
return bufferedStreamCopy(is, os, 0, NULL);
}
-const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
+stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
const stream::size_type length, progressListener* progress)
{
const stream::size_type blockSize =
@@ -176,7 +176,7 @@ inputStreamAdapter::inputStreamAdapter(std::istream& is)
}
-const bool inputStreamAdapter::eof() const
+bool inputStreamAdapter::eof() const
{
return (m_stream.eof());
}
@@ -190,7 +190,7 @@ void inputStreamAdapter::reset()
}
-const stream::size_type inputStreamAdapter::read
+stream::size_type inputStreamAdapter::read
(value_type* const data, const size_type count)
{
m_stream.exceptions(std::ios_base::badbit);
@@ -199,7 +199,7 @@ const stream::size_type inputStreamAdapter::read
}
-const stream::size_type inputStreamAdapter::skip(const size_type count)
+stream::size_type inputStreamAdapter::skip(const size_type count)
{
m_stream.exceptions(std::ios_base::badbit);
m_stream.ignore(count);
@@ -223,7 +223,7 @@ inputStreamStringAdapter::inputStreamStringAdapter(const string& buffer,
}
-const bool inputStreamStringAdapter::eof() const
+bool inputStreamStringAdapter::eof() const
{
return (m_pos >= m_end);
}
@@ -235,7 +235,7 @@ void inputStreamStringAdapter::reset()
}
-const stream::size_type inputStreamStringAdapter::read
+stream::size_type inputStreamStringAdapter::read
(value_type* const data, const size_type count)
{
if (m_pos + count >= m_end)
@@ -255,7 +255,7 @@ const stream::size_type inputStreamStringAdapter::read
}
-const stream::size_type inputStreamStringAdapter::skip(const size_type count)
+stream::size_type inputStreamStringAdapter::skip(const size_type count)
{
if (m_pos + count >= m_end)
{
@@ -280,7 +280,7 @@ inputStreamStringProxyAdapter::inputStreamStringProxyAdapter(const stringProxy&
}
-const bool inputStreamStringProxyAdapter::eof() const
+bool inputStreamStringProxyAdapter::eof() const
{
return (m_pos >= m_buffer.length());
}
@@ -292,7 +292,7 @@ void inputStreamStringProxyAdapter::reset()
}
-const stream::size_type inputStreamStringProxyAdapter::read
+stream::size_type inputStreamStringProxyAdapter::read
(value_type* const data, const size_type count)
{
const size_type remaining = m_buffer.length() - m_pos;
@@ -312,7 +312,7 @@ const stream::size_type inputStreamStringProxyAdapter::read
}
-const stream::size_type inputStreamStringProxyAdapter::skip(const size_type count)
+stream::size_type inputStreamStringProxyAdapter::skip(const size_type count)
{
const size_type remaining = m_buffer.length() - m_pos;
@@ -352,7 +352,7 @@ inputStreamPointerAdapter::~inputStreamPointerAdapter()
}
-const bool inputStreamPointerAdapter::eof() const
+bool inputStreamPointerAdapter::eof() const
{
return (m_stream->eof());
}
@@ -366,7 +366,7 @@ void inputStreamPointerAdapter::reset()
}
-const stream::size_type inputStreamPointerAdapter::read
+stream::size_type inputStreamPointerAdapter::read
(value_type* const data, const size_type count)
{
m_stream->exceptions(std::ios_base::badbit);
@@ -375,7 +375,7 @@ const stream::size_type inputStreamPointerAdapter::read
}
-const stream::size_type inputStreamPointerAdapter::skip(const size_type count)
+stream::size_type inputStreamPointerAdapter::skip(const size_type count)
{
m_stream->exceptions(std::ios_base::badbit);
m_stream->ignore(count);
@@ -392,7 +392,7 @@ inputStreamByteBufferAdapter::inputStreamByteBufferAdapter(const byte_t* buffer,
}
-const bool inputStreamByteBufferAdapter::eof() const
+bool inputStreamByteBufferAdapter::eof() const
{
return m_pos >= m_length;
}
@@ -404,7 +404,7 @@ void inputStreamByteBufferAdapter::reset()
}
-const stream::size_type inputStreamByteBufferAdapter::read
+stream::size_type inputStreamByteBufferAdapter::read
(value_type* const data, const size_type count)
{
const size_type remaining = m_length - m_pos;
@@ -426,7 +426,7 @@ const stream::size_type inputStreamByteBufferAdapter::read
}
-const stream::size_type inputStreamByteBufferAdapter::skip(const size_type count)
+stream::size_type inputStreamByteBufferAdapter::skip(const size_type count)
{
const size_type remaining = m_length - m_pos;
@@ -468,7 +468,7 @@ void outputStreamSocketAdapter::flush()
}
-const stream::size_type outputStreamSocketAdapter::getBlockSize() const
+stream::size_type outputStreamSocketAdapter::getBlockSize() const
{
return 16384; // 16 KB
}
@@ -483,7 +483,7 @@ inputStreamSocketAdapter::inputStreamSocketAdapter(net::socket& sok)
}
-const bool inputStreamSocketAdapter::eof() const
+bool inputStreamSocketAdapter::eof() const
{
// Can't know...
return false;
@@ -496,14 +496,14 @@ void inputStreamSocketAdapter::reset()
}
-const stream::size_type inputStreamSocketAdapter::read
+stream::size_type inputStreamSocketAdapter::read
(value_type* const data, const size_type count)
{
return m_socket.receiveRaw(data, count);
}
-const stream::size_type inputStreamSocketAdapter::skip
+stream::size_type inputStreamSocketAdapter::skip
(const size_type /* count */)
{
// Not supported
@@ -511,7 +511,7 @@ const stream::size_type inputStreamSocketAdapter::skip
}
-const stream::size_type inputStreamSocketAdapter::getBlockSize() const
+stream::size_type inputStreamSocketAdapter::getBlockSize() const
{
return 16384; // 16 KB
}
diff --git a/src/utility/stringProxy.cpp b/src/utility/stringProxy.cpp
index 7984d7f8..60093b60 100644
--- a/src/utility/stringProxy.cpp
+++ b/src/utility/stringProxy.cpp
@@ -112,19 +112,19 @@ void stringProxy::extract(outputStream& os, const size_type start, const size_ty
}
-const stringProxy::size_type stringProxy::length() const
+stringProxy::size_type stringProxy::length() const
{
return (m_end - m_start);
}
-const stringProxy::size_type stringProxy::start() const
+stringProxy::size_type stringProxy::start() const
{
return (m_start);
}
-const stringProxy::size_type stringProxy::end() const
+stringProxy::size_type stringProxy::end() const
{
return (m_end);
}
diff --git a/src/utility/stringUtils.cpp b/src/utility/stringUtils.cpp
index 65c3d66d..9566599c 100644
--- a/src/utility/stringUtils.cpp
+++ b/src/utility/stringUtils.cpp
@@ -29,7 +29,7 @@ namespace vmime {
namespace utility {
-const bool stringUtils::isStringEqualNoCase
+bool stringUtils::isStringEqualNoCase
(const string& s1, const char* s2, const string::size_type n)
{
// 'n' is the number of characters to compare
@@ -49,7 +49,7 @@ const bool stringUtils::isStringEqualNoCase
}
-const bool stringUtils::isStringEqualNoCase(const string& s1, const string& s2)
+bool stringUtils::isStringEqualNoCase(const string& s1, const string& s2)
{
if (s1.length() != s2.length())
return (false);
@@ -67,7 +67,7 @@ const bool stringUtils::isStringEqualNoCase(const string& s1, const string& s2)
}
-const bool stringUtils::isStringEqualNoCase
+bool stringUtils::isStringEqualNoCase
(const string::const_iterator begin, const string::const_iterator end,
const char* s, const string::size_type n)
{
@@ -125,15 +125,15 @@ const string stringUtils::trim(const string& str)
if (b != e)
{
- for ( ; b != e && parserHelpers::isSpace(*b) ; ++b);
- for ( ; e != b && parserHelpers::isSpace(*(e - 1)) ; --e);
+ for ( ; b != e && parserHelpers::isSpace(*b) ; ++b) {}
+ for ( ; e != b && parserHelpers::isSpace(*(e - 1)) ; --e) {}
}
return (string(b, e));
}
-const string::size_type stringUtils::countASCIIchars
+string::size_type stringUtils::countASCIIchars
(const string::const_iterator begin, const string::const_iterator end)
{
string::size_type count = 0;
diff --git a/src/utility/url.cpp b/src/utility/url.cpp
index 8cf1f7d7..7f609c7f 100644
--- a/src/utility/url.cpp
+++ b/src/utility/url.cpp
@@ -369,7 +369,7 @@ void url::setHost(const string& host)
}
-const port_t url::getPort() const
+port_t url::getPort() const
{
return (m_port);
}
diff --git a/src/utility/urlUtils.cpp b/src/utility/urlUtils.cpp
index a4d31469..d4243dfd 100644
--- a/src/utility/urlUtils.cpp
+++ b/src/utility/urlUtils.cpp
@@ -40,7 +40,7 @@ const string urlUtils::encode(const string& s)
for (string::const_iterator it = s.begin() ; it != s.end() ; ++it)
{
- const char_t c = *it;
+ const string::value_type c = *it;
if (parserHelpers::isPrint(c) && !parserHelpers::isSpace(c) &&
static_cast <unsigned char>(c) <= 127 &&
@@ -73,7 +73,7 @@ const string urlUtils::decode(const string& s)
for (string::const_iterator it = s.begin() ; it != s.end() ; )
{
- const char_t c = *it;
+ const string::value_type c = *it;
switch (c)
{
@@ -84,7 +84,7 @@ const string urlUtils::decode(const string& s)
const char_t p = (it != s.end() ? *(it++) : 0);
const char_t q = (it != s.end() ? *(it++) : 0);
- unsigned char r = 0;
+ unsigned int r = 0;
switch (p)
{
diff --git a/src/word.cpp b/src/word.cpp
index 3a0605ff..b129965d 100644
--- a/src/word.cpp
+++ b/src/word.cpp
@@ -246,21 +246,21 @@ void word::parse(const string& buffer, const string::size_type position,
const string::const_iterator charsetPos = p;
- for ( ; p != pend && *p != '?' ; ++p);
+ for ( ; p != pend && *p != '?' ; ++p) {}
if (p != pend) // a charset is specified
{
const string::const_iterator charsetEnd = p;
const string::const_iterator encPos = ++p; // skip '?'
- for ( ; p != pend && *p != '?' ; ++p);
+ for ( ; p != pend && *p != '?' ; ++p) {}
if (p != pend) // an encoding is specified
{
//const string::const_iterator encEnd = p;
const string::const_iterator dataPos = ++p; // skip '?'
- for ( ; p != pend && !(*p == '?' && *(p + 1) == '=') ; ++p);
+ for ( ; p != pend && !(*p == '?' && *(p + 1) == '=') ; ++p) {}
if (p != pend) // some data is specified
{
@@ -647,13 +647,13 @@ void word::copyFrom(const component& other)
}
-const bool word::operator==(const word& w) const
+bool word::operator==(const word& w) const
{
return (m_charset == w.m_charset && m_buffer == w.m_buffer);
}
-const bool word::operator!=(const word& w) const
+bool word::operator!=(const word& w) const
{
return (m_charset != w.m_charset || m_buffer != w.m_buffer);
}
diff --git a/src/wordEncoder.cpp b/src/wordEncoder.cpp
index 1b7643c6..9888c169 100644
--- a/src/wordEncoder.cpp
+++ b/src/wordEncoder.cpp
@@ -72,7 +72,7 @@ wordEncoder::wordEncoder(const string& buffer, const charset& charset, const Enc
}
-static const string::size_type getUTF8CharLength
+static string::size_type getUTF8CharLength
(const string& buffer, const string::size_type pos, const string::size_type length)
{
// Gives the number of extra bytes in a UTF8 char, given the leading char
@@ -253,14 +253,14 @@ const string wordEncoder::getNextChunk(const string::size_type maxLength)
}
-const wordEncoder::Encoding wordEncoder::getEncoding() const
+wordEncoder::Encoding wordEncoder::getEncoding() const
{
return m_encoding;
}
// static
-const wordEncoder::Encoding wordEncoder::guessBestEncoding
+wordEncoder::Encoding wordEncoder::guessBestEncoding
(const string& buffer, const charset& charset)
{
// If the charset is ISO-8859-x, set to QP encoding
diff --git a/tests/testRunner.cpp b/tests/testRunner.cpp
index e2930372..e286a10d 100644
--- a/tests/testRunner.cpp
+++ b/tests/testRunner.cpp
@@ -56,7 +56,7 @@ public:
gettimeofday(&m_start, &tz);
}
- const double getDuration() const
+ double getDuration() const
{
struct timeval tv;
struct timezone tz;
diff --git a/tests/testUtils.cpp b/tests/testUtils.cpp
index a774068d..0fa816c9 100644
--- a/tests/testUtils.cpp
+++ b/tests/testUtils.cpp
@@ -45,7 +45,7 @@ void testSocket::disconnect()
}
-const bool testSocket::isConnected() const
+bool testSocket::isConnected() const
{
return m_connected;
}
@@ -66,7 +66,7 @@ void testSocket::send(const vmime::string& buffer)
}
-const int testSocket::receiveRaw(char* buffer, const int count)
+int testSocket::receiveRaw(char* buffer, const int count)
{
const int n = std::min(count, static_cast <int>(m_inBuffer.size()));
@@ -142,7 +142,7 @@ const vmime::string lineBasedTestSocket::getNextLine()
return line;
}
-const bool lineBasedTestSocket::haveMoreLines() const
+bool lineBasedTestSocket::haveMoreLines() const
{
return !m_lines.empty();
}
@@ -156,7 +156,7 @@ testTimeoutHandler::testTimeoutHandler(const unsigned int delay)
}
-const bool testTimeoutHandler::isTimeOut()
+bool testTimeoutHandler::isTimeOut()
{
return (vmime::platform::getHandler()->getUnixTime() - m_start) >= m_delay;
}
@@ -168,7 +168,7 @@ void testTimeoutHandler::resetTimeOut()
}
-const bool testTimeoutHandler::handleTimeOut()
+bool testTimeoutHandler::handleTimeOut()
{
return false;
}
diff --git a/tests/testUtils.hpp b/tests/testUtils.hpp
index c2185a08..42e88795 100644
--- a/tests/testUtils.hpp
+++ b/tests/testUtils.hpp
@@ -208,12 +208,12 @@ public:
void connect(const vmime::string& address, const vmime::port_t port);
void disconnect();
- const bool isConnected() const;
+ bool isConnected() const;
void receive(vmime::string& buffer);
void send(const vmime::string& buffer);
- const int receiveRaw(char* buffer, const int count);
+ int receiveRaw(char* buffer, const int count);
void sendRaw(const char* buffer, const int count);
/** Send data to client.
@@ -268,7 +268,7 @@ public:
void onDataReceived();
const vmime::string getNextLine();
- const bool haveMoreLines() const;
+ bool haveMoreLines() const;
virtual void processCommand() = 0;
@@ -285,9 +285,9 @@ public:
testTimeoutHandler(const unsigned int delay = 3);
- const bool isTimeOut();
+ bool isTimeOut();
void resetTimeOut();
- const bool handleTimeOut();
+ bool handleTimeOut();
private:
diff --git a/tests/utility/filteredStreamTest.cpp b/tests/utility/filteredStreamTest.cpp
index 1926d9bb..bcc785e3 100644
--- a/tests/utility/filteredStreamTest.cpp
+++ b/tests/utility/filteredStreamTest.cpp
@@ -55,10 +55,10 @@ VMIME_TEST_SUITE_BEGIN
void addChunk(const std::string& chunk) { m_chunks.push_back(chunk); }
- const bool eof() const { return (m_index >= m_chunks.size()); }
+ bool eof() const { return (m_index >= m_chunks.size()); }
void reset() { m_index = 0; }
- const size_type read(value_type* const data, const size_type /* count */)
+ size_type read(value_type* const data, const size_type /* count */)
{
if (eof())
return 0;
@@ -74,7 +74,7 @@ VMIME_TEST_SUITE_BEGIN
return chunk.length();
}
- const size_type skip(const size_type /* count */)
+ size_type skip(const size_type /* count */)
{
// Not supported
return 0;
diff --git a/tests/utility/smartPtrTest.cpp b/tests/utility/smartPtrTest.cpp
index 68e5ff04..ce0b941f 100644
--- a/tests/utility/smartPtrTest.cpp
+++ b/tests/utility/smartPtrTest.cpp
@@ -44,8 +44,8 @@ VMIME_TEST_SUITE_BEGIN
struct A : public vmime::object
{
- const int strongCount() const { return getRefManager()->getStrongRefCount(); }
- const int weakCount() const { return getRefManager()->getWeakRefCount(); }
+ int strongCount() const { return getRefManager()->getStrongRefCount(); }
+ int weakCount() const { return getRefManager()->getWeakRefCount(); }
};
struct B : public virtual A { };
diff --git a/tests/utility/urlTest.cpp b/tests/utility/urlTest.cpp
index b5a38a95..245657a1 100644
--- a/tests/utility/urlTest.cpp
+++ b/tests/utility/urlTest.cpp
@@ -48,7 +48,7 @@ VMIME_TEST_SUITE_BEGIN
VMIME_TEST_LIST_END
- static const bool parseHelper(vmime::utility::url& u, const vmime::string& str)
+ static bool parseHelper(vmime::utility::url& u, const vmime::string& str)
{
try
{
diff --git a/vmime/address.hpp b/vmime/address.hpp
index 27e2dd31..31d00f02 100644
--- a/vmime/address.hpp
+++ b/vmime/address.hpp
@@ -55,13 +55,13 @@ public:
*
* @return true if this address is empty
*/
- virtual const bool isEmpty() const = 0;
+ virtual bool isEmpty() const = 0;
/** Test whether this is object is a mailboxGroup.
*
* @return true if this is a mailboxGroup, false otherwise
*/
- virtual const bool isGroup() const = 0;
+ virtual bool isGroup() const = 0;
virtual ref <component> clone() const = 0;
diff --git a/vmime/addressList.hpp b/vmime/addressList.hpp
index 67a66771..7bb7635c 100644
--- a/vmime/addressList.hpp
+++ b/vmime/addressList.hpp
@@ -117,13 +117,13 @@ public:
*
* @return number of addresses
*/
- const int getAddressCount() const;
+ int getAddressCount() const;
/** Tests whether the list of addresses is empty.
*
* @return true if there is no address, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the address at the specified position.
*
diff --git a/vmime/attachmentHelper.hpp b/vmime/attachmentHelper.hpp
index ea222ed1..f696b7ef 100644
--- a/vmime/attachmentHelper.hpp
+++ b/vmime/attachmentHelper.hpp
@@ -50,7 +50,7 @@ public:
* @param part message part to test
* @return true if the part is an attachment, false otherwise
*/
- static const bool isBodyPartAnAttachment(ref <const bodyPart> part);
+ static bool isBodyPartAnAttachment(ref <const bodyPart> part);
/** Return attachment information in the specified body part.
* If the specified body part does not contain attachment
diff --git a/vmime/body.hpp b/vmime/body.hpp
index a41d1f8f..30ac798f 100644
--- a/vmime/body.hpp
+++ b/vmime/body.hpp
@@ -114,13 +114,13 @@ public:
*
* @return number of parts
*/
- const int getPartCount() const;
+ int getPartCount() const;
/** Tests whether the list of parts is empty.
*
* @return true if there is no part, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the part at the specified position.
*
@@ -219,7 +219,7 @@ public:
* @param boundary boundary string to test
* @return true if the boundary string is valid, false otherwise
*/
- static const bool isValidBoundary(const string& boundary);
+ static bool isValidBoundary(const string& boundary);
ref <component> clone() const;
void copyFrom(const component& other);
@@ -242,7 +242,7 @@ private:
std::vector <ref <bodyPart> > m_parts;
- const bool isRootPart() const;
+ bool isRootPart() const;
void initNewPart(ref <bodyPart> part);
diff --git a/vmime/charset.hpp b/vmime/charset.hpp
index 3edcc01b..06306920 100644
--- a/vmime/charset.hpp
+++ b/vmime/charset.hpp
@@ -54,8 +54,8 @@ public:
charset& operator=(const charset& other);
- const bool operator==(const charset& value) const;
- const bool operator!=(const charset& value) const;
+ bool operator==(const charset& value) const;
+ bool operator!=(const charset& value) const;
const std::vector <ref <const component> > getChildComponents() const;
diff --git a/vmime/component.hpp b/vmime/component.hpp
index a22ec4a8..007cfc0b 100644
--- a/vmime/component.hpp
+++ b/vmime/component.hpp
@@ -98,7 +98,7 @@ public:
* @return start position in parsed buffer
* or 0 if this component has not been parsed
*/
- const string::size_type getParsedOffset() const;
+ string::size_type getParsedOffset() const;
/** Return the length of this component in the
* parsed message contents.
@@ -106,7 +106,7 @@ public:
* @return length of the component in parsed buffer
* or 0 if this component has not been parsed
*/
- const string::size_type getParsedLength() const;
+ string::size_type getParsedLength() const;
/** Return the list of children of this component.
*
diff --git a/vmime/contentDisposition.hpp b/vmime/contentDisposition.hpp
index f5da21b7..19b13c29 100644
--- a/vmime/contentDisposition.hpp
+++ b/vmime/contentDisposition.hpp
@@ -68,8 +68,8 @@ public:
contentDisposition& operator=(const string& name);
- const bool operator==(const contentDisposition& value) const;
- const bool operator!=(const contentDisposition& value) const;
+ bool operator==(const contentDisposition& value) const;
+ bool operator!=(const contentDisposition& value) const;
private:
diff --git a/vmime/contentHandler.hpp b/vmime/contentHandler.hpp
index f29753cd..303b08cf 100644
--- a/vmime/contentHandler.hpp
+++ b/vmime/contentHandler.hpp
@@ -91,13 +91,13 @@ public:
*
* @return length of data
*/
- virtual const string::size_type getLength() const = 0;
+ virtual string::size_type getLength() const = 0;
/** Returns 'true' if data managed by this object is encoded.
*
* @return true if data is encoded, false otherwise
*/
- virtual const bool isEncoded() const = 0;
+ virtual bool isEncoded() const = 0;
/** Returns the encoding used for data (or "binary" if not encoded).
*
@@ -109,7 +109,7 @@ public:
*
* @return true if no data is managed by this object, false otherwise
*/
- virtual const bool isEmpty() const = 0;
+ virtual bool isEmpty() const = 0;
};
diff --git a/vmime/dateTime.hpp b/vmime/dateTime.hpp
index 6261bec5..07765756 100644
--- a/vmime/dateTime.hpp
+++ b/vmime/dateTime.hpp
@@ -192,15 +192,15 @@ private:
public:
// Get
- const int getYear() const;
- const int getMonth() const;
- const int getDay() const;
- const int getHour() const;
- const int getMinute() const;
- const int getSecond() const;
- const int getZone() const;
- const int getWeekDay() const;
- const int getWeek() const;
+ int getYear() const;
+ int getMonth() const;
+ int getDay() const;
+ int getHour() const;
+ int getMinute() const;
+ int getSecond() const;
+ int getZone() const;
+ int getWeekDay() const;
+ int getWeek() const;
void getTime(int& hour, int& minute, int& second, int& zone) const;
void getTime(int& hour, int& minute, int& second) const;
@@ -227,12 +227,12 @@ public:
ref <component> clone() const;
// Comparison
- const bool operator==(const datetime& other) const;
- const bool operator!=(const datetime& other) const;
- const bool operator<(const datetime& other) const;
- const bool operator<=(const datetime& other) const;
- const bool operator>(const datetime& other) const;
- const bool operator>=(const datetime& other) const;
+ bool operator==(const datetime& other) const;
+ bool operator!=(const datetime& other) const;
+ bool operator<(const datetime& other) const;
+ bool operator<=(const datetime& other) const;
+ bool operator>(const datetime& other) const;
+ bool operator>=(const datetime& other) const;
// Current date and time
static const datetime now();
diff --git a/vmime/disposition.hpp b/vmime/disposition.hpp
index 163b7f26..44bde218 100644
--- a/vmime/disposition.hpp
+++ b/vmime/disposition.hpp
@@ -118,7 +118,7 @@ public:
* @param modifier modifier to test
* @return true if the specified modifier is set, false otherwise
*/
- const bool hasModifier(const string& modifier) const;
+ bool hasModifier(const string& modifier) const;
/** Return the list of modifiers.
*
diff --git a/vmime/emptyContentHandler.hpp b/vmime/emptyContentHandler.hpp
index d0da261a..d5aaffdf 100644
--- a/vmime/emptyContentHandler.hpp
+++ b/vmime/emptyContentHandler.hpp
@@ -45,13 +45,13 @@ public:
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
- const string::size_type getLength() const;
+ string::size_type getLength() const;
- const bool isEncoded() const;
+ bool isEncoded() const;
const vmime::encoding& getEncoding() const;
- const bool isEmpty() const;
+ bool isEmpty() const;
};
diff --git a/vmime/encoder.hpp b/vmime/encoder.hpp
index fa42e12a..cb5de063 100644
--- a/vmime/encoder.hpp
+++ b/vmime/encoder.hpp
@@ -53,7 +53,7 @@ public:
* want to receive progress notifications
* @return number of bytes written into output stream
*/
- virtual const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
+ virtual utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
/** Decode data.
*
@@ -63,7 +63,7 @@ public:
* want to receive progress notifications
* @return number of bytes written into output stream
*/
- virtual const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
+ virtual utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
/** Return the properties of the encoder.
*
diff --git a/vmime/encoderB64.hpp b/vmime/encoderB64.hpp
index 048453ff..46444a53 100644
--- a/vmime/encoderB64.hpp
+++ b/vmime/encoderB64.hpp
@@ -41,8 +41,8 @@ public:
encoderB64();
- const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
- const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;
diff --git a/vmime/encoderDefault.hpp b/vmime/encoderDefault.hpp
index 5ef48bb2..71dc9e9f 100644
--- a/vmime/encoderDefault.hpp
+++ b/vmime/encoderDefault.hpp
@@ -41,8 +41,8 @@ public:
encoderDefault();
- const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
- const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
};
diff --git a/vmime/encoderFactory.hpp b/vmime/encoderFactory.hpp
index 971cc481..5358ce76 100644
--- a/vmime/encoderFactory.hpp
+++ b/vmime/encoderFactory.hpp
@@ -126,7 +126,7 @@ public:
*
* @return number of registered encoders
*/
- const int getEncoderCount() const;
+ int getEncoderCount() const;
/** Return the registered encoder at the specified position.
*
diff --git a/vmime/encoderQP.hpp b/vmime/encoderQP.hpp
index 6f0a2c26..bd604abc 100644
--- a/vmime/encoderQP.hpp
+++ b/vmime/encoderQP.hpp
@@ -41,8 +41,8 @@ public:
encoderQP();
- const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
- const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;
diff --git a/vmime/encoderUUE.hpp b/vmime/encoderUUE.hpp
index e0323ac3..bdffb101 100644
--- a/vmime/encoderUUE.hpp
+++ b/vmime/encoderUUE.hpp
@@ -41,8 +41,8 @@ public:
encoderUUE();
- const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
- const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
+ utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;
};
diff --git a/vmime/encoding.hpp b/vmime/encoding.hpp
index 62f4314e..fa5cc183 100644
--- a/vmime/encoding.hpp
+++ b/vmime/encoding.hpp
@@ -67,8 +67,8 @@ public:
encoding& operator=(const encoding& other);
encoding& operator=(const string& name);
- const bool operator==(const encoding& value) const;
- const bool operator!=(const encoding& value) const;
+ bool operator==(const encoding& value) const;
+ bool operator!=(const encoding& value) const;
const std::vector <ref <const component> > getChildComponents() const;
diff --git a/vmime/fileAttachment.hpp b/vmime/fileAttachment.hpp
index 6e80b5ae..dbf17108 100644
--- a/vmime/fileAttachment.hpp
+++ b/vmime/fileAttachment.hpp
@@ -59,7 +59,7 @@ public:
* @return true if the 'filename' property is set,
* false otherwise
*/
- const bool hasFilename() const;
+ bool hasFilename() const;
/** Return the value of the 'filename' property.
*
@@ -78,7 +78,7 @@ public:
* @return true if the 'creation-date' property is set,
* false otherwise
*/
- const bool hasCreationDate() const;
+ bool hasCreationDate() const;
/** Return the value of the 'creation-date' property.
*
@@ -97,7 +97,7 @@ public:
* @return true if the 'modification-date' property is set,
* false otherwise
*/
- const bool hasModificationDate() const;
+ bool hasModificationDate() const;
/** Return the value of the 'modification-date' property.
*
@@ -116,7 +116,7 @@ public:
* @return true if the 'read-date' property is set,
* false otherwise
*/
- const bool hasReadDate() const;
+ bool hasReadDate() const;
/** Return the value of the 'read-date' property.
*
@@ -135,13 +135,13 @@ public:
* @return true if the 'size' property is set,
* false otherwise
*/
- const bool hasSize() const;
+ bool hasSize() const;
/** Return the value of the 'size' property.
*
* @return file size
*/
- const unsigned int getSize() const;
+ unsigned int getSize() const;
/** Set the value of the 'size' property.
*
diff --git a/vmime/header.hpp b/vmime/header.hpp
index 9f3b0c4d..65236cff 100644
--- a/vmime/header.hpp
+++ b/vmime/header.hpp
@@ -94,7 +94,7 @@ public:
* @return true if at least one field with the specified name
* exists, or false otherwise
*/
- const bool hasField(const string& fieldName) const;
+ bool hasField(const string& fieldName) const;
/** Find the first field that matches the specified name.
* If no field is found, an exception is thrown.
@@ -182,13 +182,13 @@ public:
*
* @return number of fields
*/
- const int getFieldCount() const;
+ int getFieldCount() const;
/** Tests whether the list of fields is empty.
*
* @return true if there is no field, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the field at the specified position.
*
@@ -232,7 +232,7 @@ private:
public:
fieldHasName(const string& name);
- const bool operator() (const ref <const headerField>& field);
+ bool operator() (const ref <const headerField>& field);
private:
@@ -244,7 +244,7 @@ private:
public:
fieldHasNotName(const string& name);
- const bool operator() (const ref <const headerField>& field);
+ bool operator() (const ref <const headerField>& field);
private:
diff --git a/vmime/headerField.hpp b/vmime/headerField.hpp
index de0b82c3..3d8f26a9 100644
--- a/vmime/headerField.hpp
+++ b/vmime/headerField.hpp
@@ -78,7 +78,7 @@ public:
*
* @return true if the field is a custom field, false otherwise
*/
- const bool isCustom() const;
+ bool isCustom() const;
/** Return the read-only value object attached to this field.
*
diff --git a/vmime/htmlTextPart.hpp b/vmime/htmlTextPart.hpp
index 443ac09c..140b4ddf 100644
--- a/vmime/htmlTextPart.hpp
+++ b/vmime/htmlTextPart.hpp
@@ -107,7 +107,7 @@ public:
* @return true if an object with this identifier exists,
* false otherwise
*/
- const bool hasObject(const string& id) const;
+ bool hasObject(const string& id) const;
/** Return the embedded object with the specified identifier.
*
@@ -121,7 +121,7 @@ public:
*
* @return number of embedded objects
*/
- const int getObjectCount() const;
+ int getObjectCount() const;
/** Return the embedded object at the specified position.
*
@@ -168,7 +168,7 @@ public:
const string addObject(ref <contentHandler> data, const encoding& enc, const mediaType& type);
- const int getPartCount() const;
+ int getPartCount() const;
void generateIn(ref <bodyPart> message, ref <bodyPart> parent) const;
void parse(ref <const bodyPart> message, ref <const bodyPart> parent, ref <const bodyPart> textPart);
diff --git a/vmime/mailbox.hpp b/vmime/mailbox.hpp
index d0145dd6..2717ec58 100644
--- a/vmime/mailbox.hpp
+++ b/vmime/mailbox.hpp
@@ -73,22 +73,22 @@ public:
void setEmail(const string& email);
// Comparison
- const bool operator==(const class mailbox& mailbox) const;
- const bool operator!=(const class mailbox& mailbox) const;
+ bool operator==(const class mailbox& mailbox) const;
+ bool operator!=(const class mailbox& mailbox) const;
// Assignment
void copyFrom(const component& other);
ref <component> clone() const;
mailbox& operator=(const mailbox& other);
- const bool isEmpty() const;
+ bool isEmpty() const;
void clear();
const std::vector <ref <const component> > getChildComponents() const;
- const bool isGroup() const;
+ bool isGroup() const;
protected:
diff --git a/vmime/mailboxGroup.hpp b/vmime/mailboxGroup.hpp
index 47b4de25..8038c061 100644
--- a/vmime/mailboxGroup.hpp
+++ b/vmime/mailboxGroup.hpp
@@ -124,13 +124,13 @@ public:
*
* @return number of mailboxes
*/
- const int getMailboxCount() const;
+ int getMailboxCount() const;
/** Tests whether the list of mailboxes is empty.
*
* @return true if there is no mailbox, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the mailbox at the specified position.
*
@@ -158,7 +158,7 @@ public:
*/
const std::vector <ref <mailbox> > getMailboxList();
- const bool isGroup() const;
+ bool isGroup() const;
private:
diff --git a/vmime/mailboxList.hpp b/vmime/mailboxList.hpp
index bf5e717a..33b2ace8 100644
--- a/vmime/mailboxList.hpp
+++ b/vmime/mailboxList.hpp
@@ -111,13 +111,13 @@ public:
*
* @return number of mailboxes
*/
- const int getMailboxCount() const;
+ int getMailboxCount() const;
/** Tests whether the list of mailboxes is empty.
*
* @return true if there is no mailbox, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the mailbox at the specified position.
*
diff --git a/vmime/mdn/MDNHelper.hpp b/vmime/mdn/MDNHelper.hpp
index c4790de1..ee9f4211 100644
--- a/vmime/mdn/MDNHelper.hpp
+++ b/vmime/mdn/MDNHelper.hpp
@@ -70,7 +70,7 @@ public:
* @param msg message
* @return true if the message is a MDN, false otherwise
*/
- static const bool isMDN(const ref <const message> msg);
+ static bool isMDN(const ref <const message> msg);
/** If the specified message is a MDN, return information
* about it.
@@ -88,7 +88,7 @@ public:
* @param msg message for which to send a MDN
* @return true if user confirmation should be asked, false otherwise
*/
- static const bool needConfirmation(const ref <const message> msg);
+ static bool needConfirmation(const ref <const message> msg);
/** Build a new MDN for the message. The resulting MDN can then be
* sent over SMTP transport service.
diff --git a/vmime/mediaType.hpp b/vmime/mediaType.hpp
index 20dbaba8..59d80205 100644
--- a/vmime/mediaType.hpp
+++ b/vmime/mediaType.hpp
@@ -46,8 +46,8 @@ public:
public:
- const bool operator==(const mediaType& type) const;
- const bool operator!=(const mediaType& type) const;
+ bool operator==(const mediaType& type) const;
+ bool operator!=(const mediaType& type) const;
mediaType& operator=(const string& type);
diff --git a/vmime/messageBuilder.hpp b/vmime/messageBuilder.hpp
index 803c8710..b94fe823 100644
--- a/vmime/messageBuilder.hpp
+++ b/vmime/messageBuilder.hpp
@@ -168,7 +168,7 @@ public:
*
* @return number of attachments
*/
- const int getAttachmentCount() const;
+ int getAttachmentCount() const;
/** Return the list of attachments.
*
diff --git a/vmime/messageId.hpp b/vmime/messageId.hpp
index ce780227..60f62ada 100644
--- a/vmime/messageId.hpp
+++ b/vmime/messageId.hpp
@@ -76,8 +76,8 @@ public:
messageId& operator=(const string& id);
- const bool operator==(const messageId& mid) const;
- const bool operator!=(const messageId& mid) const;
+ bool operator==(const messageId& mid) const;
+ bool operator!=(const messageId& mid) const;
/** Generate a random message identifier.
*
diff --git a/vmime/messageIdSequence.hpp b/vmime/messageIdSequence.hpp
index 89302048..e1989fe6 100644
--- a/vmime/messageIdSequence.hpp
+++ b/vmime/messageIdSequence.hpp
@@ -110,13 +110,13 @@ public:
*
* @return number of message-ides
*/
- const int getMessageIdCount() const;
+ int getMessageIdCount() const;
/** Tests whether the list of message-ides is empty.
*
* @return true if there is no message-id, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the message-id at the specified position.
*
diff --git a/vmime/messageParser.hpp b/vmime/messageParser.hpp
index 4c423931..211fac7c 100644
--- a/vmime/messageParser.hpp
+++ b/vmime/messageParser.hpp
@@ -94,7 +94,7 @@ public:
*
* @return number of attachments
*/
- const int getAttachmentCount() const;
+ int getAttachmentCount() const;
/** Return the attachment at the specified position.
*
@@ -119,7 +119,7 @@ public:
*
* @return number of text parts
*/
- const int getTextPartCount() const;
+ int getTextPartCount() const;
/** Return the text part at the specified position.
*
diff --git a/vmime/misc/importanceHelper.hpp b/vmime/misc/importanceHelper.hpp
index 0192bfe8..a139ffbc 100644
--- a/vmime/misc/importanceHelper.hpp
+++ b/vmime/misc/importanceHelper.hpp
@@ -72,7 +72,7 @@ public:
* @return importance of the message, or default importance is no
* information about importance is given in the message
*/
- static const Importance getImportance(ref <const message> msg);
+ static Importance getImportance(ref <const message> msg);
/** Return the importance of a message, given its header.
*
@@ -80,7 +80,7 @@ public:
* @return importance of the message, or default importance is no
* information about importance is given in the message
*/
- static const Importance getImportanceHeader(ref <const header> hdr);
+ static Importance getImportanceHeader(ref <const header> hdr);
/** Set the importance of the specified message.
*
diff --git a/vmime/net/connectionInfos.hpp b/vmime/net/connectionInfos.hpp
index 97fd354d..302aecbb 100644
--- a/vmime/net/connectionInfos.hpp
+++ b/vmime/net/connectionInfos.hpp
@@ -48,7 +48,7 @@ public:
*
* @return server port
*/
- virtual const port_t getPort() const = 0;
+ virtual port_t getPort() const = 0;
};
diff --git a/vmime/net/defaultConnectionInfos.hpp b/vmime/net/defaultConnectionInfos.hpp
index b4438b38..0c996848 100644
--- a/vmime/net/defaultConnectionInfos.hpp
+++ b/vmime/net/defaultConnectionInfos.hpp
@@ -41,7 +41,7 @@ public:
defaultConnectionInfos(const string& host, const port_t port);
const string getHost() const;
- const port_t getPort() const;
+ port_t getPort() const;
private:
diff --git a/vmime/net/events.hpp b/vmime/net/events.hpp
index 253942e6..66ce2076 100644
--- a/vmime/net/events.hpp
+++ b/vmime/net/events.hpp
@@ -64,7 +64,7 @@ public:
*
* @return event type (see messageCountEvent::Types)
*/
- const Types getType() const;
+ Types getType() const;
/** Return the numbers of the messages that have been added/removed.
*
@@ -127,7 +127,7 @@ public:
*
* @return event type (see messageChangedEvent::Types)
*/
- const Types getType() const;
+ Types getType() const;
/** Return the numbers of the messages that have changed.
*
@@ -191,7 +191,7 @@ public:
*
* @return event type (see folderEvent::Types)
*/
- const Types getType() const;
+ Types getType() const;
/** Dispatch the event to the specified listener.
*
diff --git a/vmime/net/folder.hpp b/vmime/net/folder.hpp
index e1ed6e3c..0ae33c56 100644
--- a/vmime/net/folder.hpp
+++ b/vmime/net/folder.hpp
@@ -99,19 +99,19 @@ public:
*
* @return folder type (see folder::Types)
*/
- virtual const int getType() = 0;
+ virtual int getType() = 0;
/** Return the flags of this folder.
*
* @return folder flags (see folder::Flags)
*/
- virtual const int getFlags() = 0;
+ virtual int getFlags() = 0;
/** Return the mode in which the folder has been open.
*
* @return folder opening mode (see folder::Modes)
*/
- virtual const int getMode() const = 0;
+ virtual int getMode() const = 0;
/** Return the name of this folder.
*
@@ -154,7 +154,7 @@ public:
*
* @return true if the folder exists, false otherwise
*/
- virtual const bool exists() = 0;
+ virtual bool exists() = 0;
/** Delete this folder.
* The folder should be closed before attempting to delete it.
@@ -167,7 +167,7 @@ public:
*
* @return true if the folder is open, false otherwise
*/
- virtual const bool isOpen() const = 0;
+ virtual bool isOpen() const = 0;
/** Get a new reference to a message in this folder.
*
@@ -198,7 +198,7 @@ public:
*
* @return number of messages in the folder
*/
- virtual const int getMessageCount() = 0;
+ virtual int getMessageCount() = 0;
/** Get a new reference to a sub-folder in this folder.
*
@@ -381,7 +381,7 @@ public:
*
* @return list of supported fetchable objects
*/
- virtual const int getFetchCapabilities() const = 0;
+ virtual int getFetchCapabilities() const = 0;
// Event listeners
void addMessageChangedListener(events::messageChangedListener* l);
diff --git a/vmime/net/imap/IMAPConnection.hpp b/vmime/net/imap/IMAPConnection.hpp
index b61c60df..865a4df7 100644
--- a/vmime/net/imap/IMAPConnection.hpp
+++ b/vmime/net/imap/IMAPConnection.hpp
@@ -55,7 +55,7 @@ public:
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
@@ -68,11 +68,11 @@ public:
STATE_LOGOUT
};
- const ProtocolStates state() const;
+ ProtocolStates state() const;
void setState(const ProtocolStates state);
- const char hierarchySeparator() const;
+ char hierarchySeparator() const;
void send(bool tag, const string& what, bool end);
@@ -93,7 +93,7 @@ public:
ref <security::authenticator> getAuthenticator();
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
private:
diff --git a/vmime/net/imap/IMAPFolder.hpp b/vmime/net/imap/IMAPFolder.hpp
index 133f4c0f..434653ac 100644
--- a/vmime/net/imap/IMAPFolder.hpp
+++ b/vmime/net/imap/IMAPFolder.hpp
@@ -62,11 +62,11 @@ private:
public:
- const int getMode() const;
+ int getMode() const;
- const int getType();
+ int getType();
- const int getFlags();
+ int getFlags();
const folder::path::component getName() const;
const folder::path getFullPath() const;
@@ -75,16 +75,16 @@ public:
void close(const bool expunge);
void create(const int type);
- const bool exists();
+ bool exists();
void destroy();
- const bool isOpen() const;
+ bool isOpen() const;
ref <message> getMessage(const int num);
std::vector <ref <message> > getMessages(const int from = 1, const int to = -1);
std::vector <ref <message> > getMessages(const std::vector <int>& nums);
- const int getMessageCount();
+ int getMessageCount();
ref <folder> getFolder(const folder::path::component& name);
std::vector <ref <folder> > getFolders(const bool recursive = false);
@@ -118,7 +118,7 @@ public:
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
- const int getFetchCapabilities() const;
+ int getFetchCapabilities() const;
private:
@@ -129,7 +129,7 @@ private:
void onClose();
- const int testExistAndGetType();
+ int testExistAndGetType();
void setMessageFlags(const string& set, const int flags, const int mode);
diff --git a/vmime/net/imap/IMAPMessage.hpp b/vmime/net/imap/IMAPMessage.hpp
index 5f16eea2..caab8198 100644
--- a/vmime/net/imap/IMAPMessage.hpp
+++ b/vmime/net/imap/IMAPMessage.hpp
@@ -54,20 +54,20 @@ private:
public:
- const int getNumber() const;
+ int getNumber() const;
const uid getUniqueId() const;
- const int getSize() const;
+ int getSize() const;
- const bool isExpunged() const;
+ bool isExpunged() const;
ref <const structure> getStructure() const;
ref <structure> getStructure();
ref <const header> getHeader() const;
- const int getFlags() const;
+ int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp
index e6edb3ed..c6e1831d 100644
--- a/vmime/net/imap/IMAPParser.hpp
+++ b/vmime/net/imap/IMAPParser.hpp
@@ -166,7 +166,7 @@ public:
*
* @return true if we are in strict mode, false otherwise
*/
- const bool isStrict() const
+ bool isStrict() const
{
return m_strict;
}
@@ -548,7 +548,7 @@ public:
public:
- const unsigned int value() const { return (m_value); }
+ unsigned int value() const { return (m_value); }
};
@@ -703,7 +703,7 @@ public:
string::size_type pos = *currentPos;
- const unsigned char c = (pos < line.length() ? line[pos] : 0);
+ const unsigned char c = static_cast <unsigned char>(pos < line.length() ? line[pos] : 0);
if (c >= 0x01 && c <= 0x7f && // 0x01 - 0x7f
c != '"' && c != '\\' && // quoted_specials
@@ -730,7 +730,7 @@ public:
public:
- const char value() const { return (m_value); }
+ char value() const { return (m_value); }
};
@@ -1374,7 +1374,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const string& name() const { return (m_name); }
const IMAPParser::atom* flag_keyword() const { return (m_flag_keyword); }
@@ -1474,7 +1474,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const string& name() const { return (m_name); }
};
@@ -1544,7 +1544,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const string& name() const { return (m_name); }
};
@@ -1652,7 +1652,7 @@ public:
const IMAPParser::mailbox_flag_list* mailbox_flag_list() const { return (m_mailbox_flag_list); }
const IMAPParser::mailbox* mailbox() const { return (m_mailbox); }
- const char quoted_char() const { return (m_quoted_char); }
+ char quoted_char() const { return (m_quoted_char); }
};
@@ -1776,7 +1776,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const IMAPParser::nz_number* nz_number() const { return (m_nz_number); }
const IMAPParser::atom* atom() const { return (m_atom); }
@@ -1944,7 +1944,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const string name() const { return (m_name); }
};
@@ -2005,7 +2005,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
};
@@ -2470,7 +2470,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const IMAPParser::header_list* header_list() const { return (m_header_list); }
};
@@ -3991,7 +3991,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const IMAPParser::date_time* date_time() const { return (m_date_time); }
const IMAPParser::number* number() const { return (m_number); }
@@ -4113,8 +4113,8 @@ public:
public:
- const Type type() const { return (m_type); }
- const unsigned int number() const { return (m_number); }
+ Type type() const { return (m_type); }
+ unsigned int number() const { return (m_number); }
const IMAPParser::msg_att* msg_att() const { return (m_msg_att); }
};
@@ -4181,7 +4181,7 @@ public:
public:
const IMAPParser::resp_text* resp_text() const { return (m_resp_text); }
- const Status status() const { return (m_status); }
+ Status status() const { return (m_status); }
};
@@ -4285,7 +4285,7 @@ public:
public:
- const Condition condition() const { return (m_cond); }
+ Condition condition() const { return (m_cond); }
const IMAPParser::resp_text* resp_text() const { return (m_resp_text); }
};
@@ -4511,7 +4511,7 @@ public:
public:
- const Type type() const { return (m_type); }
+ Type type() const { return (m_type); }
const IMAPParser::number* number() const { return (m_number); }
const IMAPParser::mailbox_flag_list* mailbox_flag_list() const { return (m_mailbox_flag_list); }
@@ -4812,7 +4812,7 @@ public:
}
- const bool isBad() const
+ bool isBad() const
{
if (!response_done()) // incomplete (partial) response
return (true);
@@ -4970,7 +4970,7 @@ public:
//
template <class TYPE>
- const bool check(string& line, string::size_type* currentPos,
+ bool check(string& line, string::size_type* currentPos,
const bool noThrow = false)
{
const string::size_type oldPos = *currentPos;
@@ -4992,7 +4992,7 @@ public:
}
template <class TYPE, class ARG_TYPE>
- const bool checkWithArg(string& line, string::size_type* currentPos,
+ bool checkWithArg(string& line, string::size_type* currentPos,
const ARG_TYPE arg, const bool noThrow = false)
{
const string::size_type oldPos = *currentPos;
diff --git a/vmime/net/imap/IMAPStore.hpp b/vmime/net/imap/IMAPStore.hpp
index a594ae16..bf8235e3 100644
--- a/vmime/net/imap/IMAPStore.hpp
+++ b/vmime/net/imap/IMAPStore.hpp
@@ -65,22 +65,22 @@ public:
ref <folder> getRootFolder();
ref <folder> getFolder(const folder::path& path);
- const bool isValidFolderName(const folder::path::component& name) const;
+ bool isValidFolderName(const folder::path::component& name) const;
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void noop();
- const int getCapabilities() const;
+ int getCapabilities() const;
- const bool isIMAPS() const;
+ bool isIMAPS() const;
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
protected:
diff --git a/vmime/net/imap/IMAPTag.hpp b/vmime/net/imap/IMAPTag.hpp
index d53316c3..04c8b94e 100644
--- a/vmime/net/imap/IMAPTag.hpp
+++ b/vmime/net/imap/IMAPTag.hpp
@@ -47,7 +47,7 @@ public:
IMAPTag& operator++(); // ++IMAPTag
const IMAPTag operator++(int); // IMAPTag++
- const int number() const;
+ int number() const;
operator string() const;
diff --git a/vmime/net/imap/IMAPUtils.hpp b/vmime/net/imap/IMAPUtils.hpp
index 51b1b6ec..181bd460 100644
--- a/vmime/net/imap/IMAPUtils.hpp
+++ b/vmime/net/imap/IMAPUtils.hpp
@@ -58,10 +58,10 @@ public:
*/
static const string quoteString(const string& text);
- static const int folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list);
- static const int folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list);
+ static int folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list);
+ static int folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list);
- static const int messageFlagsFromFlags(const IMAPParser::flag_list* list);
+ static int messageFlagsFromFlags(const IMAPParser::flag_list* list);
static const string messageFlagList(const int flags);
diff --git a/vmime/net/maildir/format/courierMaildirFormat.hpp b/vmime/net/maildir/format/courierMaildirFormat.hpp
index 11cc88f4..b533abce 100644
--- a/vmime/net/maildir/format/courierMaildirFormat.hpp
+++ b/vmime/net/maildir/format/courierMaildirFormat.hpp
@@ -59,8 +59,8 @@ public:
void destroyFolder(const folder::path& path);
void renameFolder(const folder::path& oldPath, const folder::path& newPath);
- const bool folderExists(const folder::path& path) const;
- const bool folderHasSubfolders(const folder::path& path) const;
+ bool folderExists(const folder::path& path) const;
+ bool folderHasSubfolders(const folder::path& path) const;
const utility::file::path folderPathToFileSystemPath
(const folder::path& path, const DirectoryType type) const;
@@ -70,7 +70,7 @@ public:
protected:
- const bool supports() const;
+ bool supports() const;
static const string toModifiedUTF7(const folder::path::component& text);
@@ -86,7 +86,7 @@ protected:
* @return true if the specified directory is a maildir subfolder,
* false otherwise
*/
- static const bool isSubfolderDirectory(const utility::file& file);
+ static bool isSubfolderDirectory(const utility::file& file);
/** List directories corresponding to folders which are (direct or
* indirect) children of specified folder.
@@ -98,7 +98,7 @@ protected:
* @return true if at least one directory has been found,
* false otherwise
*/
- const bool listDirectories(const folder::path& root,
+ bool listDirectories(const folder::path& root,
std::vector <string>& dirs, const bool onlyTestForExistence) const;
};
diff --git a/vmime/net/maildir/format/kmailMaildirFormat.hpp b/vmime/net/maildir/format/kmailMaildirFormat.hpp
index 6aa8c79c..0dfb9642 100644
--- a/vmime/net/maildir/format/kmailMaildirFormat.hpp
+++ b/vmime/net/maildir/format/kmailMaildirFormat.hpp
@@ -59,8 +59,8 @@ public:
void destroyFolder(const folder::path& path);
void renameFolder(const folder::path& oldPath, const folder::path& newPath);
- const bool folderExists(const folder::path& path) const;
- const bool folderHasSubfolders(const folder::path& path) const;
+ bool folderExists(const folder::path& path) const;
+ bool folderHasSubfolders(const folder::path& path) const;
const utility::file::path folderPathToFileSystemPath
(const folder::path& path, const DirectoryType type) const;
@@ -70,7 +70,7 @@ public:
protected:
- const bool supports() const;
+ bool supports() const;
/** Recursive implementation of listFolders().
@@ -86,7 +86,7 @@ protected:
* @return true if the specified directory is a maildir subfolder,
* false otherwise
*/
- static const bool isSubfolderDirectory(const utility::file& file);
+ static bool isSubfolderDirectory(const utility::file& file);
};
diff --git a/vmime/net/maildir/maildirFolder.hpp b/vmime/net/maildir/maildirFolder.hpp
index c96df142..c0165fa0 100644
--- a/vmime/net/maildir/maildirFolder.hpp
+++ b/vmime/net/maildir/maildirFolder.hpp
@@ -63,11 +63,11 @@ private:
public:
- const int getMode() const;
+ int getMode() const;
- const int getType();
+ int getType();
- const int getFlags();
+ int getFlags();
const folder::path::component getName() const;
const folder::path getFullPath() const;
@@ -76,16 +76,16 @@ public:
void close(const bool expunge);
void create(const int type);
- const bool exists();
+ bool exists();
void destroy();
- const bool isOpen() const;
+ bool isOpen() const;
ref <message> getMessage(const int num);
std::vector <ref <message> > getMessages(const int from = 1, const int to = -1);
std::vector <ref <message> > getMessages(const std::vector <int>& nums);
- const int getMessageCount();
+ int getMessageCount();
ref <folder> getFolder(const folder::path::component& name);
std::vector <ref <folder> > getFolders(const bool recursive = false);
@@ -119,7 +119,7 @@ public:
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
- const int getFetchCapabilities() const;
+ int getFetchCapabilities() const;
private:
diff --git a/vmime/net/maildir/maildirFormat.hpp b/vmime/net/maildir/maildirFormat.hpp
index 5ccfa09d..e00dfdfd 100644
--- a/vmime/net/maildir/maildirFormat.hpp
+++ b/vmime/net/maildir/maildirFormat.hpp
@@ -102,7 +102,7 @@ public:
* @param path virtual path of the folder
* @return true if the folder exists, false otherwise
*/
- virtual const bool folderExists(const folder::path& path) const = 0;
+ virtual bool folderExists(const folder::path& path) const = 0;
/** Test whether the specified folder has subfolders.
*
@@ -110,7 +110,7 @@ public:
* @return true if the folder has at least one subfolder,
* false otherwise
*/
- virtual const bool folderHasSubfolders(const folder::path& path) const = 0;
+ virtual bool folderHasSubfolders(const folder::path& path) const = 0;
/** Returns the directory which represents the specified
* folder on the file system.
@@ -170,7 +170,7 @@ protected:
* @return true if the implementation supports the specified
* Maildir, or false otherwise
*/
- virtual const bool supports() const = 0;
+ virtual bool supports() const = 0;
private:
diff --git a/vmime/net/maildir/maildirMessage.hpp b/vmime/net/maildir/maildirMessage.hpp
index 6e7c394f..067bdcbb 100644
--- a/vmime/net/maildir/maildirMessage.hpp
+++ b/vmime/net/maildir/maildirMessage.hpp
@@ -54,20 +54,20 @@ private:
public:
- const int getNumber() const;
+ int getNumber() const;
const uid getUniqueId() const;
- const int getSize() const;
+ int getSize() const;
- const bool isExpunged() const;
+ bool isExpunged() const;
ref <const structure> getStructure() const;
ref <structure> getStructure();
ref <const header> getHeader() const;
- const int getFlags() const;
+ int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
diff --git a/vmime/net/maildir/maildirStore.hpp b/vmime/net/maildir/maildirStore.hpp
index 5dde8edf..0c789433 100644
--- a/vmime/net/maildir/maildirStore.hpp
+++ b/vmime/net/maildir/maildirStore.hpp
@@ -65,22 +65,22 @@ public:
ref <folder> getRootFolder();
ref <folder> getFolder(const folder::path& path);
- const bool isValidFolderName(const folder::path::component& name) const;
+ bool isValidFolderName(const folder::path::component& name) const;
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void noop();
const utility::path& getFileSystemPath() const;
- const int getCapabilities() const;
+ int getCapabilities() const;
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
ref <maildirFormat> getFormat();
diff --git a/vmime/net/maildir/maildirUtils.hpp b/vmime/net/maildir/maildirUtils.hpp
index 5506bd81..8c9920b7 100644
--- a/vmime/net/maildir/maildirUtils.hpp
+++ b/vmime/net/maildir/maildirUtils.hpp
@@ -53,7 +53,7 @@ public:
messageIdComparator(const utility::file::path::component& comp);
- const bool operator()(const utility::file::path::component& other) const;
+ bool operator()(const utility::file::path::component& other) const;
private:
@@ -66,7 +66,7 @@ public:
* @return true if the specified object is a message file,
* false otherwise
*/
- static const bool isMessageFile(const utility::file& file);
+ static bool isMessageFile(const utility::file& file);
/** Extract the unique identifier part of the message filename.
* Eg: for the filename "1071577232.28549.m03s:2,RS", it will
@@ -85,7 +85,7 @@ public:
* @param comp filename part
* @return message flags extracted from the specified filename
*/
- static const int extractFlags(const utility::file::path::component& comp);
+ static int extractFlags(const utility::file::path::component& comp);
/** Return a string representing the specified message flags.
* Eg: for (message::FLAG_SEEN | message::FLAG_REPLIED), it will
diff --git a/vmime/net/message.hpp b/vmime/net/message.hpp
index 05ff109e..2d8dc1a7 100644
--- a/vmime/net/message.hpp
+++ b/vmime/net/message.hpp
@@ -82,14 +82,14 @@ public:
*
* @return size of the part (in bytes)
*/
- virtual const int getSize() const = 0;
+ virtual int getSize() const = 0;
/** Return the part sequence number (index).
* The first part is at index zero.
*
* @return part number
*/
- virtual const int getNumber() const = 0;
+ virtual int getNumber() const = 0;
/** Return the sub-part at the specified position (zero is the
* first part).
@@ -111,7 +111,7 @@ public:
*
* @return number of sub-parts
*/
- const int getPartCount() const;
+ int getPartCount() const;
};
@@ -149,7 +149,7 @@ public:
*
* @return number of parts
*/
- virtual const int getPartCount() const = 0;
+ virtual int getPartCount() const = 0;
};
@@ -194,7 +194,7 @@ public:
*
* @return sequence number of the message
*/
- virtual const int getNumber() const = 0;
+ virtual int getNumber() const = 0;
/** Return the unique identified of this message (must fetch before).
*
@@ -206,14 +206,14 @@ public:
*
* @return size of the message (in bytes)
*/
- virtual const int getSize() const = 0;
+ virtual int getSize() const = 0;
/** Check whether this message has been expunged
* (ie: definitively deleted).
*
* @return true if the message is expunged, false otherwise
*/
- virtual const bool isExpunged() const = 0;
+ virtual bool isExpunged() const = 0;
/** Possible flags for a message.
*/
@@ -243,7 +243,7 @@ public:
*
* @return flags of the message
*/
- virtual const int getFlags() const = 0;
+ virtual int getFlags() const = 0;
/** Set the flags of this message.
*
diff --git a/vmime/net/pop3/POP3Folder.hpp b/vmime/net/pop3/POP3Folder.hpp
index 5938bad2..951abc52 100644
--- a/vmime/net/pop3/POP3Folder.hpp
+++ b/vmime/net/pop3/POP3Folder.hpp
@@ -61,11 +61,11 @@ private:
public:
- const int getMode() const;
+ int getMode() const;
- const int getType();
+ int getType();
- const int getFlags();
+ int getFlags();
const folder::path::component getName() const;
const folder::path getFullPath() const;
@@ -74,16 +74,16 @@ public:
void close(const bool expunge);
void create(const int type);
- const bool exists();
+ bool exists();
void destroy();
- const bool isOpen() const;
+ bool isOpen() const;
ref <message> getMessage(const int num);
std::vector <ref <message> > getMessages(const int from = 1, const int to = -1);
std::vector <ref <message> > getMessages(const std::vector <int>& nums);
- const int getMessageCount();
+ int getMessageCount();
ref <folder> getFolder(const folder::path::component& name);
std::vector <ref <folder> > getFolders(const bool recursive = false);
@@ -117,7 +117,7 @@ public:
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
- const int getFetchCapabilities() const;
+ int getFetchCapabilities() const;
private:
diff --git a/vmime/net/pop3/POP3Message.hpp b/vmime/net/pop3/POP3Message.hpp
index e98fee6c..ccfa0892 100644
--- a/vmime/net/pop3/POP3Message.hpp
+++ b/vmime/net/pop3/POP3Message.hpp
@@ -56,20 +56,20 @@ private:
public:
- const int getNumber() const;
+ int getNumber() const;
const uid getUniqueId() const;
- const int getSize() const;
+ int getSize() const;
- const bool isExpunged() const;
+ bool isExpunged() const;
ref <const structure> getStructure() const;
ref <structure> getStructure();
ref <const header> getHeader() const;
- const int getFlags() const;
+ int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
diff --git a/vmime/net/pop3/POP3Store.hpp b/vmime/net/pop3/POP3Store.hpp
index 4130d516..55c0ce47 100644
--- a/vmime/net/pop3/POP3Store.hpp
+++ b/vmime/net/pop3/POP3Store.hpp
@@ -64,20 +64,20 @@ public:
ref <folder> getRootFolder();
ref <folder> getFolder(const folder::path& path);
- const bool isValidFolderName(const folder::path::component& name) const;
+ bool isValidFolderName(const folder::path::component& name) const;
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void noop();
- const int getCapabilities() const;
+ int getCapabilities() const;
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
private:
@@ -100,17 +100,17 @@ private:
const std::vector <string> getCapabilities();
- static const bool isSuccessResponse(const string& buffer);
- static const bool stripFirstLine(const string& buffer, string& result, string* firstLine = NULL);
+ static bool isSuccessResponse(const string& buffer);
+ static bool stripFirstLine(const string& buffer, string& result, string* firstLine = NULL);
static void stripResponseCode(const string& buffer, string& result);
- static const int getResponseCode(const string& buffer);
+ static int getResponseCode(const string& buffer);
void sendRequest(const string& buffer, const bool end = true);
void readResponse(string& buffer, const bool multiLine, utility::progressListener* progress = NULL);
void readResponse(utility::outputStream& os, utility::progressListener* progress = NULL, const int predictedSize = 0);
- static const bool checkTerminator(string& buffer, const bool multiLine);
- static const bool checkOneTerminator(string& buffer, const string& term);
+ static bool checkTerminator(string& buffer, const bool multiLine);
+ static bool checkOneTerminator(string& buffer, const string& term);
void internalDisconnect();
diff --git a/vmime/net/sendmail/sendmailTransport.hpp b/vmime/net/sendmail/sendmailTransport.hpp
index b08b155c..8383e110 100644
--- a/vmime/net/sendmail/sendmailTransport.hpp
+++ b/vmime/net/sendmail/sendmailTransport.hpp
@@ -58,14 +58,14 @@ public:
const serviceInfos& getInfos() const;
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void noop();
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL);
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
private:
diff --git a/vmime/net/service.hpp b/vmime/net/service.hpp
index 721c602d..c260f2a8 100644
--- a/vmime/net/service.hpp
+++ b/vmime/net/service.hpp
@@ -71,7 +71,7 @@ public:
*
* @return type of service
*/
- virtual const Type getType() const = 0;
+ virtual Type getType() const = 0;
/** Return the protocol name of this service.
*
@@ -109,7 +109,7 @@ public:
*
* @return true if the service is connected, false otherwise
*/
- virtual const bool isConnected() const = 0;
+ virtual bool isConnected() const = 0;
/** Do nothing but ensure the server do not disconnect (for
* example, this can reset the auto-logout timer on the
@@ -196,7 +196,7 @@ public:
*
* @return true if the connection is secured, false otherwise
*/
- virtual const bool isSecuredConnection() const = 0;
+ virtual bool isSecuredConnection() const = 0;
/** Get information about the connection.
*
diff --git a/vmime/net/serviceFactory.hpp b/vmime/net/serviceFactory.hpp
index cbb61497..730df2ed 100644
--- a/vmime/net/serviceFactory.hpp
+++ b/vmime/net/serviceFactory.hpp
@@ -78,7 +78,7 @@ public:
(ref <session> sess,
ref <security::authenticator> auth) const = 0;
- virtual const int getType() const = 0;
+ virtual int getType() const = 0;
virtual const string& getName() const = 0;
virtual const serviceInfos& getInfos() const = 0;
};
@@ -132,7 +132,7 @@ public:
*
* @return number of registered services
*/
- const int getServiceCount() const;
+ int getServiceCount() const;
/** Return the registered service at the specified position.
*
diff --git a/vmime/net/serviceInfos.hpp b/vmime/net/serviceInfos.hpp
index 87a5a948..745f85ef 100644
--- a/vmime/net/serviceInfos.hpp
+++ b/vmime/net/serviceInfos.hpp
@@ -171,14 +171,14 @@ public:
*
* @return property value type
*/
- const Types getType() const;
+ Types getType() const;
/** Return the attributes of the property (see
* serviceInfos::property::Types constants).
*
* @return property attributes
*/
- const int getFlags() const;
+ int getFlags() const;
private:
@@ -227,7 +227,7 @@ public:
* @param p property to test
* @return true if the property is set, false otherwise
*/
- const bool hasProperty(ref <session> s, const property& p) const;
+ bool hasProperty(ref <session> s, const property& p) const;
};
diff --git a/vmime/net/smtp/SMTPResponse.hpp b/vmime/net/smtp/SMTPResponse.hpp
index 47a25f1f..313f6a3b 100644
--- a/vmime/net/smtp/SMTPResponse.hpp
+++ b/vmime/net/smtp/SMTPResponse.hpp
@@ -56,7 +56,7 @@ public:
responseLine(const int code, const string& text);
void setCode(const int code);
- const int getCode() const;
+ int getCode() const;
void setText(const string& text);
const string getText() const;
@@ -82,7 +82,7 @@ public:
*
* @return response code
*/
- const int getCode() const;
+ int getCode() const;
/** Return the SMTP response text.
* The text of each line is concatenated.
@@ -102,7 +102,7 @@ public:
*
* @return number of lines in the response
*/
- const unsigned int getLineCount() const;
+ unsigned int getLineCount() const;
/** Return the last line in the response.
*
@@ -120,7 +120,7 @@ private:
const string readResponseLine();
const responseLine getNextResponse();
- static const int extractResponseCode(const string& response);
+ static int extractResponseCode(const string& response);
std::vector <responseLine> m_lines;
diff --git a/vmime/net/smtp/SMTPTransport.hpp b/vmime/net/smtp/SMTPTransport.hpp
index 017e4ee7..de0092e8 100644
--- a/vmime/net/smtp/SMTPTransport.hpp
+++ b/vmime/net/smtp/SMTPTransport.hpp
@@ -58,14 +58,14 @@ public:
const serviceInfos& getInfos() const;
void connect();
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void noop();
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL);
- const bool isSecuredConnection() const;
+ bool isSecuredConnection() const;
ref <connectionInfos> getConnectionInfos() const;
private:
diff --git a/vmime/net/socket.hpp b/vmime/net/socket.hpp
index 7fdb6070..88e1f3c4 100644
--- a/vmime/net/socket.hpp
+++ b/vmime/net/socket.hpp
@@ -57,7 +57,7 @@ public:
*
* @return true if the socket is connected, false otherwise
*/
- virtual const bool isConnected() const = 0;
+ virtual bool isConnected() const = 0;
/** Receive (text) data from the socket.
*
@@ -71,7 +71,7 @@ public:
* @param count maximum number of bytes to receive (size of buffer)
* @return number of bytes received/written into output buffer
*/
- virtual const int receiveRaw(char* buffer, const int count) = 0;
+ virtual int receiveRaw(char* buffer, const int count) = 0;
/** Send (text) data to the socket.
*
diff --git a/vmime/net/store.hpp b/vmime/net/store.hpp
index 44f0c13a..e60721b6 100644
--- a/vmime/net/store.hpp
+++ b/vmime/net/store.hpp
@@ -72,7 +72,7 @@ public:
*
* @return true if the specified folder name is valid, false otherwise
*/
- virtual const bool isValidFolderName(const folder::path::component& name) const = 0;
+ virtual bool isValidFolderName(const folder::path::component& name) const = 0;
/** Store capabilities. */
enum Capabilities
@@ -92,10 +92,10 @@ public:
*
* @return features supported by this service
*/
- virtual const int getCapabilities() const = 0;
+ virtual int getCapabilities() const = 0;
- const Type getType() const { return (TYPE_STORE); }
+ Type getType() const { return (TYPE_STORE); }
};
diff --git a/vmime/net/timeoutHandler.hpp b/vmime/net/timeoutHandler.hpp
index 3df6790d..0877ec18 100644
--- a/vmime/net/timeoutHandler.hpp
+++ b/vmime/net/timeoutHandler.hpp
@@ -45,7 +45,7 @@ public:
*
* @return true if the time-out delay is elapsed
*/
- virtual const bool isTimeOut() = 0;
+ virtual bool isTimeOut() = 0;
/** Called to reset the time-out counter.
*/
@@ -57,7 +57,7 @@ public:
* @return true to continue (and reset the time-out)
* or false to cancel the current operation
*/
- virtual const bool handleTimeOut() = 0;
+ virtual bool handleTimeOut() = 0;
};
diff --git a/vmime/net/tls/TLSSecuredConnectionInfos.hpp b/vmime/net/tls/TLSSecuredConnectionInfos.hpp
index 3cc72ce7..5451633b 100644
--- a/vmime/net/tls/TLSSecuredConnectionInfos.hpp
+++ b/vmime/net/tls/TLSSecuredConnectionInfos.hpp
@@ -49,7 +49,7 @@ public:
ref <TLSSession> tlsSession, ref <TLSSocket> tlsSocket);
const string getHost() const;
- const port_t getPort() const;
+ port_t getPort() const;
/** Return the peer's certificate (chain) as sent by the peer.
*
diff --git a/vmime/net/tls/TLSSocket.hpp b/vmime/net/tls/TLSSocket.hpp
index 816de900..1c1d324a 100644
--- a/vmime/net/tls/TLSSocket.hpp
+++ b/vmime/net/tls/TLSSocket.hpp
@@ -81,10 +81,10 @@ public:
// Implementation of 'socket'
void connect(const string& address, const port_t port);
void disconnect();
- const bool isConnected() const;
+ bool isConnected() const;
void receive(string& buffer);
- const int receiveRaw(char* buffer, const int count);
+ int receiveRaw(char* buffer, const int count);
void send(const string& buffer);
void sendRaw(const char* buffer, const int count);
diff --git a/vmime/net/transport.hpp b/vmime/net/transport.hpp
index 7cfb75f5..4ece804b 100644
--- a/vmime/net/transport.hpp
+++ b/vmime/net/transport.hpp
@@ -70,7 +70,7 @@ public:
virtual void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL) = 0;
- const Type getType() const;
+ Type getType() const;
};
diff --git a/vmime/parameterizedHeaderField.hpp b/vmime/parameterizedHeaderField.hpp
index 91656192..c2c85028 100644
--- a/vmime/parameterizedHeaderField.hpp
+++ b/vmime/parameterizedHeaderField.hpp
@@ -61,7 +61,7 @@ public:
* @return true if at least one parameter with the specified name
* exists, or false otherwise
*/
- const bool hasParameter(const string& paramName) const;
+ bool hasParameter(const string& paramName) const;
/** Find the first parameter that matches the specified name.
* If no parameter is found, an exception is thrown.
@@ -138,13 +138,13 @@ public:
*
* @return number of parameters
*/
- const int getParameterCount() const;
+ int getParameterCount() const;
/** Tests whether the list of parameters is empty.
*
* @return true if there is no parameter, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the parameter at the specified position.
*
diff --git a/vmime/parserHelpers.hpp b/vmime/parserHelpers.hpp
index 04caa2d2..9be6e4a3 100644
--- a/vmime/parserHelpers.hpp
+++ b/vmime/parserHelpers.hpp
@@ -40,25 +40,25 @@ class parserHelpers
{
public:
- static const bool isSpace(const char_t c)
+ static bool isSpace(const char_t c)
{
return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
}
- static const bool isDigit(const char_t c)
+ static bool isDigit(const char_t c)
{
return (c >= '0' && c <= '9');
}
- static const bool isAlpha(const char_t c)
+ static bool isAlpha(const char_t c)
{
return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}
- static const char_t toLower(const char_t c)
+ static char_t toLower(const char_t c)
{
if (c >= 'A' && c <= 'Z')
return ('a' + (c - 'A'));
@@ -69,7 +69,7 @@ public:
// Checks whether a character is in the 7-bit US-ASCII charset
- static const bool isAscii(const char_t c)
+ static bool isAscii(const char_t c)
{
const unsigned int x = static_cast <unsigned int>(c);
return (x <= 127);
@@ -78,7 +78,7 @@ public:
// Checks whether a character has a visual representation
- static const bool isPrint(const char_t c)
+ static bool isPrint(const char_t c)
{
const unsigned int x = static_cast <unsigned int>(c);
return (x >= 0x20 && x <= 0x7E);
diff --git a/vmime/path.hpp b/vmime/path.hpp
index 256ac15f..aa0d8cbd 100644
--- a/vmime/path.hpp
+++ b/vmime/path.hpp
@@ -68,8 +68,8 @@ public:
void setDomain(const string& domain);
// Comparison
- const bool operator==(const path& p) const;
- const bool operator!=(const path& p) const;
+ bool operator==(const path& p) const;
+ bool operator!=(const path& p) const;
// Assignment
void copyFrom(const component& other);
diff --git a/vmime/plainTextPart.hpp b/vmime/plainTextPart.hpp
index 9ea09f95..c9419b5a 100644
--- a/vmime/plainTextPart.hpp
+++ b/vmime/plainTextPart.hpp
@@ -50,7 +50,7 @@ public:
const ref <const contentHandler> getText() const;
void setText(ref <contentHandler> text);
- const int getPartCount() const;
+ int getPartCount() const;
void generateIn(ref <bodyPart> message, ref <bodyPart> parent) const;
void parse(ref <const bodyPart> message, ref <const bodyPart> parent, ref <const bodyPart> textPart);
diff --git a/vmime/platform.hpp b/vmime/platform.hpp
index 3965fb42..293320ff 100644
--- a/vmime/platform.hpp
+++ b/vmime/platform.hpp
@@ -67,7 +67,7 @@ public:
*
* @return UNIX Epoch time
*/
- virtual const unsigned int getUnixTime() const = 0;
+ virtual unsigned int getUnixTime() const = 0;
/** Return the current date and time, in the local time zone.
*
@@ -87,7 +87,7 @@ public:
*
* @return current process id
*/
- virtual const unsigned int getProcessId() const = 0;
+ virtual unsigned int getProcessId() const = 0;
/** Return the charset used on the system.
*
diff --git a/vmime/platforms/posix/posixFile.hpp b/vmime/platforms/posix/posixFile.hpp
index 9ee9733d..b7296c67 100644
--- a/vmime/platforms/posix/posixFile.hpp
+++ b/vmime/platforms/posix/posixFile.hpp
@@ -64,13 +64,13 @@ public:
posixFileReaderInputStream(const vmime::utility::file::path& path, const int fd);
~posixFileReaderInputStream();
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
+ size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type skip(const size_type count);
private:
@@ -121,7 +121,7 @@ public:
posixFileIterator(const vmime::utility::file::path& path, const vmime::string& nativePath);
~posixFileIterator();
- const bool hasMoreElements() const;
+ bool hasMoreElements() const;
ref <vmime::utility::file> nextElement();
private:
@@ -146,17 +146,17 @@ public:
void createFile();
void createDirectory(const bool createAll = false);
- const bool isFile() const;
- const bool isDirectory() const;
+ bool isFile() const;
+ bool isDirectory() const;
- const bool canRead() const;
- const bool canWrite() const;
+ bool canRead() const;
+ bool canWrite() const;
- const length_type getLength();
+ length_type getLength();
const path& getFullPath() const;
- const bool exists() const;
+ bool exists() const;
ref <vmime::utility::file> getParent() const;
@@ -193,8 +193,8 @@ public:
static const vmime::utility::file::path stringToPathImpl(const vmime::string& str);
static const vmime::string pathToStringImpl(const vmime::utility::file::path& path);
- const bool isValidPathComponent(const vmime::utility::file::path::component& comp) const;
- const bool isValidPath(const vmime::utility::file::path& path) const;
+ bool isValidPathComponent(const vmime::utility::file::path::component& comp) const;
+ bool isValidPath(const vmime::utility::file::path& path) const;
static void reportError(const vmime::utility::path& path, const int err);
};
diff --git a/vmime/platforms/posix/posixHandler.hpp b/vmime/platforms/posix/posixHandler.hpp
index 240c6291..bc787198 100644
--- a/vmime/platforms/posix/posixHandler.hpp
+++ b/vmime/platforms/posix/posixHandler.hpp
@@ -50,7 +50,7 @@ public:
posixHandler();
~posixHandler();
- const unsigned int getUnixTime() const;
+ unsigned int getUnixTime() const;
const vmime::datetime getCurrentLocalTime() const;
@@ -58,7 +58,7 @@ public:
const vmime::string getHostName() const;
- const unsigned int getProcessId() const;
+ unsigned int getProcessId() const;
#if VMIME_HAVE_MESSAGING_FEATURES
ref <vmime::net::socketFactory> getSocketFactory() const;
diff --git a/vmime/platforms/posix/posixSocket.hpp b/vmime/platforms/posix/posixSocket.hpp
index 5743194d..c2309443 100644
--- a/vmime/platforms/posix/posixSocket.hpp
+++ b/vmime/platforms/posix/posixSocket.hpp
@@ -44,11 +44,11 @@ public:
~posixSocket();
void connect(const vmime::string& address, const vmime::port_t port);
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void receive(vmime::string& buffer);
- const int receiveRaw(char* buffer, const int count);
+ int receiveRaw(char* buffer, const int count);
void send(const vmime::string& buffer);
void sendRaw(const char* buffer, const int count);
diff --git a/vmime/platforms/windows/windowsFile.hpp b/vmime/platforms/windows/windowsFile.hpp
index ee6d7890..7e818591 100644
--- a/vmime/platforms/windows/windowsFile.hpp
+++ b/vmime/platforms/windows/windowsFile.hpp
@@ -49,10 +49,10 @@ public:
static const vmime::utility::file::path stringToPathImpl(const vmime::string& str);
static const vmime::string pathToStringImpl(const vmime::utility::file::path& path);
- const bool isValidPathComponent(const vmime::utility::file::path::component& comp) const;
- const bool isValidPathComponent(const vmime::utility::file::path::component& comp,
+ bool isValidPathComponent(const vmime::utility::file::path::component& comp) const;
+ bool isValidPathComponent(const vmime::utility::file::path::component& comp,
bool firstComponent) const;
- const bool isValidPath(const vmime::utility::file::path& path) const;
+ bool isValidPath(const vmime::utility::file::path& path) const;
static void reportError(const vmime::utility::path& path, const int err);
};
@@ -67,17 +67,17 @@ public:
void createFile();
void createDirectory(const bool createAll = false);
- const bool isFile() const;
- const bool isDirectory() const;
+ bool isFile() const;
+ bool isDirectory() const;
- const bool canRead() const;
- const bool canWrite() const;
+ bool canRead() const;
+ bool canWrite() const;
const length_type getLength();
const path& getFullPath() const;
- const bool exists() const;
+ bool exists() const;
ref <file> getParent() const;
@@ -108,7 +108,7 @@ public:
windowsFileIterator(const vmime::utility::file::path& path, const vmime::string& nativePath);
~windowsFileIterator();
- const bool hasMoreElements() const;
+ bool hasMoreElements() const;
vmime::ref <vmime::utility::file> nextElement();
private:
@@ -153,10 +153,10 @@ public:
public:
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
diff --git a/vmime/platforms/windows/windowsHandler.hpp b/vmime/platforms/windows/windowsHandler.hpp
index d67d8606..2f65651e 100644
--- a/vmime/platforms/windows/windowsHandler.hpp
+++ b/vmime/platforms/windows/windowsHandler.hpp
@@ -49,7 +49,7 @@ public:
windowsHandler();
~windowsHandler();
- const unsigned int getUnixTime() const;
+ unsigned int getUnixTime() const;
const vmime::datetime getCurrentLocalTime() const;
@@ -57,7 +57,7 @@ public:
const vmime::string getHostName() const;
- const unsigned int getProcessId() const;
+ unsigned int getProcessId() const;
#if VMIME_HAVE_MESSAGING_FEATURES
ref <vmime::net::socketFactory> getSocketFactory() const;
diff --git a/vmime/platforms/windows/windowsSocket.hpp b/vmime/platforms/windows/windowsSocket.hpp
index 49bf95fd..6890ddcf 100644
--- a/vmime/platforms/windows/windowsSocket.hpp
+++ b/vmime/platforms/windows/windowsSocket.hpp
@@ -46,11 +46,11 @@ public:
public:
void connect(const vmime::string& address, const vmime::port_t port);
- const bool isConnected() const;
+ bool isConnected() const;
void disconnect();
void receive(vmime::string& buffer);
- const int receiveRaw(char* buffer, const int count);
+ int receiveRaw(char* buffer, const int count);
void send(const vmime::string& buffer);
void sendRaw(const char* buffer, const int count);
diff --git a/vmime/propertySet.hpp b/vmime/propertySet.hpp
index 13967924..94cf1fd8 100644
--- a/vmime/propertySet.hpp
+++ b/vmime/propertySet.hpp
@@ -96,7 +96,7 @@ public:
* converted using std::istringstream)
* @return current value of the property
*/
- template <class TYPE> const TYPE getValue() const
+ template <class TYPE> TYPE getValue() const
{
TYPE val = TYPE();
@@ -127,13 +127,13 @@ public:
}
template <>
- const string propertySet::property::getValue() const
+ string propertySet::property::getValue() const
{
return (m_value);
}
template <>
- const bool propertySet::property::getValue() const
+ bool propertySet::property::getValue() const
{
if (utility::stringUtils::toLower(m_value) == "true")
return true;
@@ -258,7 +258,7 @@ public:
* @return true if the property is set (has a value),
* false otherwise
*/
- const bool hasProperty(const string& name) const;
+ bool hasProperty(const string& name) const;
/** Get the value of the specified property.
*
@@ -334,7 +334,7 @@ private:
propFinder(const string& name) : m_name(utility::stringUtils::toLower(name)) { }
- const bool operator()(ref <property> p) const
+ bool operator()(ref <property> p) const
{
return (utility::stringUtils::toLower(p->getName()) == m_name);
}
@@ -353,7 +353,7 @@ private:
public:
template <typename TYPE>
- static const TYPE valueFromString(const string& value)
+ static TYPE valueFromString(const string& value)
{
TYPE v = TYPE();
@@ -366,7 +366,7 @@ public:
}
template <typename TYPE>
- static const string valueToString(const TYPE& value)
+ static string valueToString(const TYPE& value)
{
std::ostringstream oss(value);
oss.imbue(std::locale::classic()); // no formatting
@@ -379,19 +379,19 @@ public:
#ifdef VMIME_INLINE_TEMPLATE_SPECIALIZATION
template <>
- static const string valueFromString(const string& value)
+ static string valueFromString(const string& value)
{
return value;
}
template <>
- static const string valueToString(const string& value)
+ static string valueToString(const string& value)
{
return value;
}
template <>
- static const bool valueFromString(const string& value)
+ static bool valueFromString(const string& value)
{
if (utility::stringUtils::toLower(value) == "true")
return true;
@@ -409,7 +409,7 @@ public:
}
template <>
- static const string valueToString(const bool& value)
+ static string valueToString(const bool& value)
{
return (value ? "true" : "false");
}
@@ -435,14 +435,14 @@ public:
template <> void propertySet::property::setValue(const string& value);
template <> void propertySet::property::setValue(const bool& value);
-template <> const string propertySet::property::getValue() const;
-template <> const bool propertySet::property::getValue() const;
+template <> string propertySet::property::getValue() const;
+template <> bool propertySet::property::getValue() const;
-template <> const string propertySet::valueFromString(const string& value);
-template <> const string propertySet::valueToString(const string& value);
+template <> string propertySet::valueFromString(const string& value);
+template <> string propertySet::valueToString(const string& value);
-template <> const bool propertySet::valueFromString(const string& value);
-template <> const string propertySet::valueToString(const bool& value);
+template <> bool propertySet::valueFromString(const string& value);
+template <> string propertySet::valueToString(const bool& value);
#endif // VMIME_INLINE_TEMPLATE_SPECIALIZATION
diff --git a/vmime/security/cert/X509Certificate.hpp b/vmime/security/cert/X509Certificate.hpp
index a341563e..e7ca309b 100644
--- a/vmime/security/cert/X509Certificate.hpp
+++ b/vmime/security/cert/X509Certificate.hpp
@@ -107,14 +107,14 @@ public:
* @return true if this certificate was issued by the given issuer,
* false otherwise
*/
- const bool checkIssuer(ref <const X509Certificate> issuer) const;
+ bool checkIssuer(ref <const X509Certificate> issuer) const;
/** Verifies this certificate against a given trusted one.
*
* @param caCert a certificate that is considered to be trusted one
* @return true if the verification succeeded, false otherwise
*/
- const bool verify(ref <const X509Certificate> caCert) const;
+ bool verify(ref <const X509Certificate> caCert) const;
/** Gets the expiration date of this certificate. This is the date
* at which this certificate will not be valid anymore.
@@ -140,8 +140,8 @@ public:
// Implementation of 'certificate'
const byteArray getEncoded() const;
const string getType() const;
- const int getVersion() const;
- const bool equals(ref <const certificate> other) const;
+ int getVersion() const;
+ bool equals(ref <const certificate> other) const;
private:
diff --git a/vmime/security/cert/certificate.hpp b/vmime/security/cert/certificate.hpp
index eb964286..440a1a8f 100644
--- a/vmime/security/cert/certificate.hpp
+++ b/vmime/security/cert/certificate.hpp
@@ -56,7 +56,7 @@ public:
*
* @return the version of this certificate
*/
- virtual const int getVersion() const = 0;
+ virtual int getVersion() const = 0;
/** Checks if two certificates are the same.
*
@@ -64,7 +64,7 @@ public:
* @return true if the two certificates are the same,
* false otherwise
*/
- virtual const bool equals(ref <const certificate> other) const = 0;
+ virtual bool equals(ref <const certificate> other) const = 0;
};
diff --git a/vmime/security/cert/certificateChain.hpp b/vmime/security/cert/certificateChain.hpp
index c363f94a..bb213139 100644
--- a/vmime/security/cert/certificateChain.hpp
+++ b/vmime/security/cert/certificateChain.hpp
@@ -53,7 +53,7 @@ public:
*
* @return number of certificates in the chain
*/
- const unsigned int getCount() const;
+ unsigned int getCount() const;
/** Return the certificate at the specified position. 0 is the
* subject certificate, 1 is the issuer's certificate, 2 is
diff --git a/vmime/security/digest/md5/md5MessageDigest.hpp b/vmime/security/digest/md5/md5MessageDigest.hpp
index 30072f61..893cb058 100644
--- a/vmime/security/digest/md5/md5MessageDigest.hpp
+++ b/vmime/security/digest/md5/md5MessageDigest.hpp
@@ -50,7 +50,7 @@ public:
void finalize(const byte_t* buffer, const unsigned long len);
void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len);
- const int getDigestLength() const;
+ int getDigestLength() const;
const byte_t* getDigest() const;
void reset();
diff --git a/vmime/security/digest/messageDigest.hpp b/vmime/security/digest/messageDigest.hpp
index 8372c01a..95c3b2bd 100644
--- a/vmime/security/digest/messageDigest.hpp
+++ b/vmime/security/digest/messageDigest.hpp
@@ -103,7 +103,7 @@ public:
*
* @return length of computed hash
*/
- virtual const int getDigestLength() const = 0;
+ virtual int getDigestLength() const = 0;
/** Returns the hash, as computed by the algorithm.
* You must call finalize() before using this function, or the
diff --git a/vmime/security/digest/sha1/sha1MessageDigest.hpp b/vmime/security/digest/sha1/sha1MessageDigest.hpp
index fd8745c5..129db80e 100644
--- a/vmime/security/digest/sha1/sha1MessageDigest.hpp
+++ b/vmime/security/digest/sha1/sha1MessageDigest.hpp
@@ -50,7 +50,7 @@ public:
void finalize(const byte_t* buffer, const unsigned long len);
void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len);
- const int getDigestLength() const;
+ int getDigestLength() const;
const byte_t* getDigest() const;
void reset();
diff --git a/vmime/security/sasl/SASLMechanism.hpp b/vmime/security/sasl/SASLMechanism.hpp
index efe11895..32838311 100644
--- a/vmime/security/sasl/SASLMechanism.hpp
+++ b/vmime/security/sasl/SASLMechanism.hpp
@@ -64,7 +64,7 @@ public:
* authentication (in this case, the values in 'response' and
* 'responseLen' are undetermined)
*/
- virtual const bool step
+ virtual bool step
(ref <SASLSession> sess,
const byte_t* challenge, const int challengeLen,
byte_t** response, int* responseLen) = 0;
@@ -76,7 +76,7 @@ public:
* @return true if the authentication has finished, or false
* otherwise
*/
- virtual const bool isComplete() const = 0;
+ virtual bool isComplete() const = 0;
/** Encode data according to negotiated SASL mechanism. This
* might mean that data is integrity or privacy protected.
diff --git a/vmime/security/sasl/SASLMechanismFactory.hpp b/vmime/security/sasl/SASLMechanismFactory.hpp
index 55b751b8..13d0efd7 100644
--- a/vmime/security/sasl/SASLMechanismFactory.hpp
+++ b/vmime/security/sasl/SASLMechanismFactory.hpp
@@ -113,7 +113,7 @@ public:
* @return true if the specified mechanism is supported,
* false otherwise
*/
- const bool isMechanismSupported(const string& name) const;
+ bool isMechanismSupported(const string& name) const;
private:
diff --git a/vmime/security/sasl/SASLSession.hpp b/vmime/security/sasl/SASLSession.hpp
index d2db6ffe..8c9eca6f 100644
--- a/vmime/security/sasl/SASLSession.hpp
+++ b/vmime/security/sasl/SASLSession.hpp
@@ -101,7 +101,7 @@ public:
* authentication (in this case, the values in 'response' and
* 'responseLen' are undetermined)
*/
- const bool evaluateChallenge
+ bool evaluateChallenge
(const byte_t* challenge, const int challengeLen,
byte_t** response, int* responseLen);
diff --git a/vmime/security/sasl/SASLSocket.hpp b/vmime/security/sasl/SASLSocket.hpp
index 388bf6f1..fc6fc394 100644
--- a/vmime/security/sasl/SASLSocket.hpp
+++ b/vmime/security/sasl/SASLSocket.hpp
@@ -50,10 +50,10 @@ public:
void connect(const string& address, const port_t port);
void disconnect();
- const bool isConnected() const;
+ bool isConnected() const;
void receive(string& buffer);
- const int receiveRaw(char* buffer, const int count);
+ int receiveRaw(char* buffer, const int count);
void send(const string& buffer);
void sendRaw(const char* buffer, const int count);
diff --git a/vmime/security/sasl/builtinSASLMechanism.hpp b/vmime/security/sasl/builtinSASLMechanism.hpp
index def338a3..a1ea5314 100644
--- a/vmime/security/sasl/builtinSASLMechanism.hpp
+++ b/vmime/security/sasl/builtinSASLMechanism.hpp
@@ -49,12 +49,11 @@ public:
const string getName() const;
- const bool step
- (ref <SASLSession> sess,
+ bool step(ref <SASLSession> sess,
const byte_t* challenge, const int challengeLen,
byte_t** response, int* responseLen);
- const bool isComplete() const;
+ bool isComplete() const;
void encode(ref <SASLSession> sess,
const byte_t* input, const int inputLen,
diff --git a/vmime/streamContentHandler.hpp b/vmime/streamContentHandler.hpp
index 0c1738fd..b9e8e972 100644
--- a/vmime/streamContentHandler.hpp
+++ b/vmime/streamContentHandler.hpp
@@ -54,13 +54,13 @@ public:
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
- const string::size_type getLength() const;
+ string::size_type getLength() const;
- const bool isEncoded() const;
+ bool isEncoded() const;
const vmime::encoding& getEncoding() const;
- const bool isEmpty() const;
+ bool isEmpty() const;
private:
diff --git a/vmime/stringContentHandler.hpp b/vmime/stringContentHandler.hpp
index 6545cba0..0e7d1e3a 100644
--- a/vmime/stringContentHandler.hpp
+++ b/vmime/stringContentHandler.hpp
@@ -72,13 +72,13 @@ public:
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
- const string::size_type getLength() const;
+ string::size_type getLength() const;
- const bool isEncoded() const;
+ bool isEncoded() const;
const vmime::encoding& getEncoding() const;
- const bool isEmpty() const;
+ bool isEmpty() const;
private:
diff --git a/vmime/text.hpp b/vmime/text.hpp
index 44014668..34427b5a 100644
--- a/vmime/text.hpp
+++ b/vmime/text.hpp
@@ -50,8 +50,8 @@ public:
public:
- const bool operator==(const text& t) const;
- const bool operator!=(const text& t) const;
+ bool operator==(const text& t) const;
+ bool operator!=(const text& t) const;
ref <component> clone() const;
void copyFrom(const component& other);
@@ -95,13 +95,13 @@ public:
*
* @return number of words
*/
- const int getWordCount() const;
+ int getWordCount() const;
/** Tests whether the list of words is empty.
*
* @return true if there is no word, false otherwise
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Return the word at the specified position.
*
diff --git a/vmime/textPart.hpp b/vmime/textPart.hpp
index 1fbbe4d4..1e8a4851 100644
--- a/vmime/textPart.hpp
+++ b/vmime/textPart.hpp
@@ -87,7 +87,7 @@ public:
*
* @return number of body parts
*/
- virtual const int getPartCount() const = 0;
+ virtual int getPartCount() const = 0;
/** Generate the text part(s) into the specified message.
*
diff --git a/vmime/utility/datetimeUtils.hpp b/vmime/utility/datetimeUtils.hpp
index 05025ee2..23d1a969 100644
--- a/vmime/utility/datetimeUtils.hpp
+++ b/vmime/utility/datetimeUtils.hpp
@@ -44,7 +44,7 @@ public:
* @param year year in 4-digit format
* @return true if year is a leap year, false otherwise
*/
- static const bool isLeapYear(const int year);
+ static bool isLeapYear(const int year);
/** Return the number of days in the specified month.
*
@@ -53,7 +53,7 @@ public:
* @param month month, January is 1, December is 12 (see datetime::Months enum)
* @return the number of days in the month
*/
- static const int getDaysInMonth(const int year, const int month);
+ static int getDaysInMonth(const int year, const int month);
/** Convert the specified date/time to UT (GMT).
*
@@ -77,7 +77,7 @@ public:
* @param day month day (1-31)
* @return the day of the week, Sunday is 0, Monday is 1 (see datetime::DaysOfWeek enum)
*/
- static const int getDayOfWeek(const int year, const int month, const int day);
+ static int getDayOfWeek(const int year, const int month, const int day);
/** Return the week number in the year (ISO 8601).
*
@@ -86,7 +86,7 @@ public:
* @param day month day (1-31)
* @return the week number (1 is the first week of the year)
*/
- static const int getWeekOfYear(const int year, const int month, const int day);
+ static int getWeekOfYear(const int year, const int month, const int day);
};
diff --git a/vmime/utility/file.hpp b/vmime/utility/file.hpp
index aecb59a4..390c4f44 100644
--- a/vmime/utility/file.hpp
+++ b/vmime/utility/file.hpp
@@ -55,7 +55,7 @@ public:
* @return true if you can call nextElement(), or false
* if no more file is available
*/
- virtual const bool hasMoreElements() const = 0;
+ virtual bool hasMoreElements() const = 0;
/** Return the next file in the list.
*
@@ -123,31 +123,31 @@ public:
*
* @return true if this is a file, false otherwise
*/
- virtual const bool isFile() const = 0;
+ virtual bool isFile() const = 0;
/** Test whether this is a directory.
*
* @return true if this is a directory, false otherwise
*/
- virtual const bool isDirectory() const = 0;
+ virtual bool isDirectory() const = 0;
/** Test whether this file is readible.
*
* @return true if we can read this file, false otherwise
*/
- virtual const bool canRead() const = 0;
+ virtual bool canRead() const = 0;
/** Test whether this file is writeable.
*
* @return true if we can write to this file, false otherwise
*/
- virtual const bool canWrite() const = 0;
+ virtual bool canWrite() const = 0;
/** Return the length of this file.
*
* @return file size (in bytes)
*/
- virtual const length_type getLength() = 0;
+ virtual length_type getLength() = 0;
/** Return the full path of this file/directory.
*
@@ -159,7 +159,7 @@ public:
*
* @return true if the file exists, false otherwise
*/
- virtual const bool exists() const = 0;
+ virtual bool exists() const = 0;
/** Return the parent directory of this file/directory.
*
@@ -247,7 +247,7 @@ public:
* @param comp path component to test
* @return true if the component is valid, false otherwise
*/
- virtual const bool isValidPathComponent(const file::path::component& comp) const = 0;
+ virtual bool isValidPathComponent(const file::path::component& comp) const = 0;
/** Test whether the specified path is syntactically valid
* (ie: components do not contain any 'special' character).
@@ -255,7 +255,7 @@ public:
* @param path path to test
* @return true if the path is valid, false otherwise
*/
- virtual const bool isValidPath(const file::path& path) const = 0;
+ virtual bool isValidPath(const file::path& path) const = 0;
};
diff --git a/vmime/utility/filteredStream.hpp b/vmime/utility/filteredStream.hpp
index 3d83e325..9f64ba95 100644
--- a/vmime/utility/filteredStream.hpp
+++ b/vmime/utility/filteredStream.hpp
@@ -80,13 +80,13 @@ public:
inputStream& getPreviousInputStream();
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
+ size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type skip(const size_type count);
private:
@@ -173,7 +173,7 @@ public:
return (m_stream);
}
- const bool eof() const
+ bool eof() const
{
return (m_found == COUNT || m_eof);
}
@@ -184,9 +184,9 @@ public:
m_stream.reset();
}
- const size_type read(value_type* const data, const size_type count);
+ size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type /* count */)
+ size_type skip(const size_type /* count */)
{
// Not supported
return 0;
@@ -204,12 +204,12 @@ private:
template <>
-const stream::size_type stopSequenceFilteredInputStream <1>::read
+stream::size_type stopSequenceFilteredInputStream <1>::read
(value_type* const data, const size_type count);
template <int COUNT>
-const stream::size_type stopSequenceFilteredInputStream <COUNT>::read
+stream::size_type stopSequenceFilteredInputStream <COUNT>::read
(value_type* const data, const size_type count)
{
// Read buffer must be at least 'COUNT' size + 1 byte
diff --git a/vmime/utility/path.hpp b/vmime/utility/path.hpp
index f9346e8f..c4aed264 100644
--- a/vmime/utility/path.hpp
+++ b/vmime/utility/path.hpp
@@ -66,8 +66,8 @@ public:
path& operator=(const component& c);
// Path comparison
- const bool operator==(const path& p) const;
- const bool operator!=(const path& p) const;
+ bool operator==(const path& p) const;
+ bool operator!=(const path& p) const;
/** Append a component to the path.
*
@@ -93,13 +93,13 @@ public:
*
* @return true if the path is empty (no components = root)
*/
- const bool isEmpty() const;
+ bool isEmpty() const;
/** Test whether this path is the root (alias for isEmpty()).
*
* @return true if the path is the root
*/
- const bool isRoot() const;
+ bool isRoot() const;
/** Return the last component of this path (const version).
*
@@ -117,7 +117,7 @@ public:
*
* @return number of components
*/
- const int getSize() const;
+ int getSize() const;
/** Return the specified component of the path (const version).
*
@@ -139,7 +139,7 @@ public:
* @return true if the specified path is a child
* of this path, false otherwise
*/
- const bool isDirectParentOf(const path& p) const;
+ bool isDirectParentOf(const path& p) const;
/** Test whether this path is a parent of another one.
*
@@ -147,7 +147,7 @@ public:
* @return true if the specified path is a child (direct or
* indirect) of this path, false otherwise
*/
- const bool isParentOf(const path& p) const;
+ bool isParentOf(const path& p) const;
/** Rename a parent component in the path.
* Example: path("a/b/c/d").renameParent("a/b", "x/y/z")
diff --git a/vmime/utility/progressListener.hpp b/vmime/utility/progressListener.hpp
index 65abc68b..f26599d7 100644
--- a/vmime/utility/progressListener.hpp
+++ b/vmime/utility/progressListener.hpp
@@ -48,7 +48,7 @@ public:
*
* @return true to cancel the operation, false otherwise
*/
- virtual const bool cancel() const = 0;
+ virtual bool cancel() const = 0;
/** Called at the beginning of the operation.
*
@@ -88,7 +88,7 @@ public:
*/
progressListenerSizeAdapter(progressListener* list, const int total);
- const bool cancel() const;
+ bool cancel() const;
void start(const int predictedTotal);
void progress(const int current, const int currentTotal);
diff --git a/vmime/utility/random.hpp b/vmime/utility/random.hpp
index 92e16617..1db15f58 100644
--- a/vmime/utility/random.hpp
+++ b/vmime/utility/random.hpp
@@ -43,21 +43,21 @@ public:
*
* @return random number
*/
- static const unsigned int getNext();
+ static unsigned int getNext();
/** Return the current time as a number (may be used to
* build "random" strings).
*
* @return time as a number
*/
- static const unsigned int getTime();
+ static unsigned int getTime();
/** Return the current process number (may be user to
* build "random" strings).
*
* @return process number
*/
- static const unsigned int getProcess();
+ static unsigned int getProcess();
/** Return a random character string with the specified length.
*
diff --git a/vmime/utility/smartPtr.hpp b/vmime/utility/smartPtr.hpp
index 19f21f52..d2a78a6d 100644
--- a/vmime/utility/smartPtr.hpp
+++ b/vmime/utility/smartPtr.hpp
@@ -53,7 +53,7 @@ public:
operator T*() { return (m_ptr); }
- T* const operator ->() { return (m_ptr); }
+ T* operator ->() { return (m_ptr); }
T& operator *() { return (*m_ptr); }
};
@@ -79,7 +79,7 @@ public:
/** Add a strong reference to the managed object.
*/
- virtual const bool addStrong() = 0;
+ virtual bool addStrong() = 0;
/** Release a strong reference to the managed object.
* If it is the last reference, the object is destroyed.
@@ -106,14 +106,14 @@ public:
*
* @return strong reference count
*/
- virtual const long getStrongRefCount() const = 0;
+ virtual long getStrongRefCount() const = 0;
/** Return the number of weak refs to this object.
* For debugging purposes only.
*
* @return weak reference count
*/
- virtual const long getWeakRefCount() const = 0;
+ virtual long getWeakRefCount() const = 0;
protected:
@@ -168,8 +168,8 @@ public:
T* operator ->() { return m_ptr; }
const T* operator ->() const { return m_ptr; }
- const T* const get() const { return m_ptr; }
- T* const get() { return m_ptr; }
+ const T* get() const { return m_ptr; }
+ T* get() { return m_ptr; }
// dynamic_cast
diff --git a/vmime/utility/smartPtrInt.hpp b/vmime/utility/smartPtrInt.hpp
index 769c980d..a7c73454 100644
--- a/vmime/utility/smartPtrInt.hpp
+++ b/vmime/utility/smartPtrInt.hpp
@@ -43,8 +43,8 @@ public:
refCounter(const long initialValue);
~refCounter();
- const long increment();
- const long decrement();
+ long increment();
+ long decrement();
operator long() const;
@@ -75,7 +75,7 @@ public:
refManagerImpl(object* obj);
~refManagerImpl();
- const bool addStrong();
+ bool addStrong();
void releaseStrong();
void addWeak();
@@ -83,8 +83,8 @@ public:
object* getObject();
- const long getStrongRefCount() const;
- const long getWeakRefCount() const;
+ long getStrongRefCount() const;
+ long getWeakRefCount() const;
private:
diff --git a/vmime/utility/stream.hpp b/vmime/utility/stream.hpp
index 94e76fae..a9c079ba 100644
--- a/vmime/utility/stream.hpp
+++ b/vmime/utility/stream.hpp
@@ -77,7 +77,7 @@ public:
*
* @return block size, in bytes
*/
- virtual const size_type getBlockSize() const;
+ virtual size_type getBlockSize() const;
};
@@ -115,7 +115,7 @@ public:
*
* @return true if we have reached the end of stream, false otherwise
*/
- virtual const bool eof() const = 0;
+ virtual bool eof() const = 0;
/** Set the read pointer to the beginning of the stream.
*
@@ -129,14 +129,14 @@ public:
* @param count maximum number of bytes to read
* @return number of bytes read
*/
- virtual const size_type read(value_type* const data, const size_type count) = 0;
+ virtual size_type read(value_type* const data, const size_type count) = 0;
/** Skip a number of bytes.
*
* @param count maximum number of bytes to ignore
* @return number of bytes skipped
*/
- virtual const size_type skip(const size_type count) = 0;
+ virtual size_type skip(const size_type count) = 0;
};
@@ -188,7 +188,7 @@ outputStream& operator<<(outputStream& os, const T& t)
* @return number of bytes copied
*/
-const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os);
+stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os);
/** Copy data from one stream into another stream using a buffered method
* and notify progress state of the operation.
@@ -200,7 +200,7 @@ const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os);
* @return number of bytes copied
*/
-const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
+stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
const stream::size_type length, progressListener* progress);
@@ -274,10 +274,10 @@ public:
*/
inputStreamAdapter(std::istream& is);
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
@@ -295,10 +295,10 @@ public:
inputStreamStringAdapter(const string& buffer);
inputStreamStringAdapter(const string& buffer, const string::size_type begin, const string::size_type end);
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
@@ -322,10 +322,10 @@ public:
*/
inputStreamStringProxyAdapter(const stringProxy& buffer);
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
@@ -350,10 +350,10 @@ public:
inputStreamPointerAdapter(std::istream* is, const bool own = true);
~inputStreamPointerAdapter();
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
@@ -373,10 +373,10 @@ public:
inputStreamByteBufferAdapter(const byte_t* buffer, size_type length);
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
private:
@@ -402,7 +402,7 @@ public:
void write(const value_type* const data, const size_type count);
void flush();
- const size_type getBlockSize() const;
+ size_type getBlockSize() const;
private:
@@ -421,12 +421,12 @@ public:
inputStreamSocketAdapter(net::socket& sok);
- const bool eof() const;
+ bool eof() const;
void reset();
- const size_type read(value_type* const data, const size_type count);
- const size_type skip(const size_type count);
+ size_type read(value_type* const data, const size_type count);
+ size_type skip(const size_type count);
- const size_type getBlockSize() const;
+ size_type getBlockSize() const;
private:
diff --git a/vmime/utility/stringProxy.hpp b/vmime/utility/stringProxy.hpp
index 0e16a1c6..d080e67a 100644
--- a/vmime/utility/stringProxy.hpp
+++ b/vmime/utility/stringProxy.hpp
@@ -66,11 +66,11 @@ public:
void extract(outputStream& os, const size_type start = 0, const size_type end = std::numeric_limits <size_type>::max(), utility::progressListener* progress = NULL) const;
// Return the "virtual" length of the string
- const size_type length() const;
+ size_type length() const;
// Return the boundaries of the "virtual" string
- const size_type start() const;
- const size_type end() const;
+ size_type start() const;
+ size_type end() const;
string::const_iterator it_begin() const { return (m_buffer.begin() + m_start); }
string::const_iterator it_end() const { return (m_buffer.begin() + m_end); }
diff --git a/vmime/utility/stringUtils.hpp b/vmime/utility/stringUtils.hpp
index 7d49e54d..89fd386e 100644
--- a/vmime/utility/stringUtils.hpp
+++ b/vmime/utility/stringUtils.hpp
@@ -50,7 +50,7 @@ public:
* @param n length of the second string
* @return true if the two strings compare equally, false otherwise
*/
- static const bool isStringEqualNoCase(const string& s1, const char* s2, const string::size_type n);
+ static bool isStringEqualNoCase(const string& s1, const char* s2, const string::size_type n);
/** Test two strings for equality (case insensitive).
* \warning Use this with ASCII-only strings.
@@ -59,7 +59,7 @@ public:
* @param s2 second string
* @return true if the two strings compare equally, false otherwise
*/
- static const bool isStringEqualNoCase(const string& s1, const string& s2);
+ static bool isStringEqualNoCase(const string& s1, const string& s2);
/** Test two strings for equality (case insensitive).
* \warning Use this with ASCII-only strings.
@@ -70,7 +70,7 @@ public:
* @param n length of the second string
* @return true if the two strings compare equally, false otherwise
*/
- static const bool isStringEqualNoCase(const string::const_iterator begin, const string::const_iterator end, const char* s, const string::size_type n);
+ static bool isStringEqualNoCase(const string::const_iterator begin, const string::const_iterator end, const char* s, const string::size_type n);
/** Transform all the characters in a string to lower-case.
* \warning Use this with ASCII-only strings.
@@ -102,7 +102,7 @@ public:
* @param end end position
* @return number of ASCII characters
*/
- static const string::size_type countASCIIchars(const string::const_iterator begin, const string::const_iterator end);
+ static string::size_type countASCIIchars(const string::const_iterator begin, const string::const_iterator end);
/** Convert the specified value to a string value.
*
diff --git a/vmime/utility/url.hpp b/vmime/utility/url.hpp
index 9fccdb9d..99585b15 100644
--- a/vmime/utility/url.hpp
+++ b/vmime/utility/url.hpp
@@ -136,7 +136,7 @@ public:
*
* @return server port
*/
- const port_t getPort() const;
+ port_t getPort() const;
/** Set the port of the URL.
*
diff --git a/vmime/word.hpp b/vmime/word.hpp
index 800a78d5..14f8b0e2 100644
--- a/vmime/word.hpp
+++ b/vmime/word.hpp
@@ -82,8 +82,8 @@ public:
word& operator=(const word& w);
word& operator=(const string& s);
- const bool operator==(const word& w) const;
- const bool operator!=(const word& w) const;
+ bool operator==(const word& w) const;
+ bool operator!=(const word& w) const;
#if VMIME_WIDE_CHAR_SUPPORT
const wstring getDecodedText() const;
diff --git a/vmime/wordEncoder.hpp b/vmime/wordEncoder.hpp
index 58c4fb7d..98294fa6 100644
--- a/vmime/wordEncoder.hpp
+++ b/vmime/wordEncoder.hpp
@@ -65,11 +65,11 @@ public:
*
* @return encoding
*/
- const Encoding getEncoding() const;
+ Encoding getEncoding() const;
private:
- static const Encoding guessBestEncoding(const string& buffer, const charset& charset);
+ static Encoding guessBestEncoding(const string& buffer, const charset& charset);
void guessBestEncoding();