aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-01-01 11:32:23 +0000
committerVincent Richard <[email protected]>2005-01-01 11:32:23 +0000
commitfc1c6b08d191b3ee9964bf53ea95767bc54377ee (patch)
tree0e6a61589b60909b065523e5e8e1e0039f2fc93d /src/text.cpp
parentFixed config file for Doxygen. (diff)
downloadvmime-fc1c6b08d191b3ee9964bf53ea95767bc54377ee.tar.gz
vmime-fc1c6b08d191b3ee9964bf53ea95767bc54377ee.zip
Converted all C-style casts to C++-style casts + added unit test for utility::md5.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/text.cpp b/src/text.cpp
index 4fb5337b..fd210bab 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -490,7 +490,7 @@ void text::encodeAndFold(utility::outputStream& os, const string::size_type maxL
const string::size_type maxLineLength3 =
(maxLineLength == lineLengthLimits::infinite)
? maxLineLength
- : std::min(maxLineLength, (const string::size_type) 76);
+ : std::min(maxLineLength, static_cast <string::size_type>(76));
// Base64 if more than 60% non-ascii, quoted-printable else (default)
const string::size_type asciiPercent = (100 * asciiCount) / buffer.length();
@@ -534,9 +534,10 @@ void text::encodeAndFold(utility::outputStream& os, const string::size_type maxL
string::const_iterator pos = buffer.begin();
string::size_type remaining = buffer.length();
- encoder* theEncoder = ((encoding == 'B')
- ? ((encoder*) new encoderB64)
- : ((encoder*) new encoderQP));
+ encoder* theEncoder;
+
+ if (encoding == 'B') theEncoder == new encoderB64;
+ else theEncoder = new encoderQP;
string qpEncodedBuffer;