diff options
author | Vincent Richard <[email protected]> | 2014-01-15 23:17:35 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2014-01-15 23:17:35 +0000 |
commit | 1a045757507f9ac43555a130ec6d8e6164048f79 (patch) | |
tree | 0d6f124c967f29c2842983d0bfcd20aa945e402c | |
parent | Use equivalence instead of strict equality for path components. (diff) | |
download | vmime-1a045757507f9ac43555a130ec6d8e6164048f79.tar.gz vmime-1a045757507f9ac43555a130ec6d8e6164048f79.zip |
Avoid calling charset::convert() if no conversion is needed.
-rw-r--r-- | src/vmime/word.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vmime/word.cpp b/src/vmime/word.cpp index 4b99fbc3..7944fc77 100644 --- a/src/vmime/word.cpp +++ b/src/vmime/word.cpp @@ -731,6 +731,9 @@ bool word::isEquivalent(const word& other) const const string word::getConvertedText(const charset& dest, const charsetConverterOptions& opts) const { + if (dest == m_charset) + return m_buffer; // no conversion needed + string out; try |