From 1a045757507f9ac43555a130ec6d8e6164048f79 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 16 Jan 2014 00:17:35 +0100 Subject: [PATCH] Avoid calling charset::convert() if no conversion is needed. --- src/vmime/word.cpp | 3 +++ 1 file changed, 3 insertions(+) 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