suppressed a few wasteful string-cstr conversions

This commit is contained in:
dockes 2008-07-01 12:11:05 +00:00
parent ffd185c220
commit b1c79ac02e

View File

@ -241,13 +241,13 @@ namespace Binc {
//----------------------------------------------------------------------
inline std::string toCanonMailbox(const std::string &s_in)
{
if (s_in.find("..") != std::string::npos) return string();
if (s_in.find("..") != std::string::npos) return std::string();
if (s_in.length() >= 5) {
std::string a = s_in.substr(0, 5);
uppercase(a);
return a == "INBOX" ?
a + (s_in.length() > 5 ? s_in.substr(5) : string() : s_in;
a + (s_in.length() > 5 ? s_in.substr(5) : std::string()) : s_in;
}
return s_in;