diff --git a/src/charset.cpp b/src/charset.cpp index 2a39b03f..9c0a2621 100644 --- a/src/charset.cpp +++ b/src/charset.cpp @@ -67,6 +67,12 @@ charset::charset(const string& name) } +charset::charset(const char* name) + : m_name(name) +{ +} + + void charset::parse(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition) { @@ -89,16 +95,6 @@ void charset::generate(utility::outputStream& os, const string::size_type /* max } -struct X -{ - X(const char**); - - operator const char**() { return x; } - operator char**() { return const_cast (x); } - - const char** x; -}; - void charset::convert(utility::inputStream& in, utility::outputStream& out, const charset& source, const charset& dest) { @@ -261,13 +257,6 @@ charset& charset::operator=(const charset& other) } -charset& charset::operator=(const string& name) -{ - parse(name); - return (*this); -} - - const bool charset::operator==(const charset& value) const { return (utility::stringUtils::isStringEqualNoCase(m_name, value.m_name)); diff --git a/vmime/charset.hpp b/vmime/charset.hpp index db614001..d0855cd2 100644 --- a/vmime/charset.hpp +++ b/vmime/charset.hpp @@ -38,6 +38,7 @@ public: charset(); charset(const string& name); + charset(const char* name); // to allow creation from vmime::charsets constants public: @@ -48,7 +49,6 @@ public: const string& getName() const; charset& operator=(const charset& other); - charset& operator=(const string& name); const bool operator==(const charset& value) const; const bool operator!=(const charset& value) const;