diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-09-17 15:06:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-09-17 16:57:35 +0200 |
commit | 149384846be910c6aa966185bce2038d6e31a565 (patch) | |
tree | 3d9c25a9211ccd1c18a3d2af0a99123a02442f88 | |
parent | 3834c12cafd645cdfdcf951b5d7c0c0223f3d79d (diff) |
No need for user-prov. INetContentTypeParameter ctor, use list-initialization
Change-Id: Ie116def9e5e90a59a82c3e8a4821eecd68eee64c
-rw-r--r-- | include/tools/inetmime.hxx | 36 | ||||
-rw-r--r-- | tools/source/inet/inetmime.cxx | 10 |
2 files changed, 9 insertions, 37 deletions
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx index b5d478623803..dc64319cf1c4 100644 --- a/include/tools/inetmime.hxx +++ b/include/tools/inetmime.hxx @@ -42,26 +42,17 @@ struct INetContentTypeParameter will only be one item for the complete parameter, with the attribute name lacking any section suffix. */ -#ifndef _LIBCPP_VERSION - const -#endif - OString m_sAttribute; + OString m_sAttribute; /** The optional character set specification (see RFC 2231), in US-ASCII encoding and converted to lower case. */ -#ifndef _LIBCPP_VERSION - const -#endif - OString m_sCharset; + OString m_sCharset; /** The optional language specification (see RFC 2231), in US-ASCII encoding and converted to lower case. */ -#ifndef _LIBCPP_VERSION - const -#endif - OString m_sLanguage; + OString m_sLanguage; /** The attribute value. If the value is a quoted-string, it is 'unpacked.' If a character set is specified, and the value can be @@ -80,30 +71,13 @@ struct INetContentTypeParameter within Unicode's Private Use Area (effectively adding 0xF800 to the character's numeric value). */ -#ifndef _LIBCPP_VERSION - const -#endif - OUString m_sValue; + OUString m_sValue; /** This is true if the value is successfully converted to Unicode, and false if the value is a special mixture of ISO-LATIN-1 characters and characters from Unicode's Private Use Area. */ -#ifndef _LIBCPP_VERSION - const -#endif - bool m_bConverted; - - INetContentTypeParameter(const OString& rTheAttribute, - const OString& rTheCharset, const OString& rTheLanguage, - const OUString& rTheValue, bool bTheConverted) - : m_sAttribute(rTheAttribute) - , m_sCharset(rTheCharset) - , m_sLanguage(rTheLanguage) - , m_sValue(rTheValue) - , m_bConverted(bTheConverted) - { - } + bool m_bConverted; }; // the key is the m_sAttribute again; all keys are lower case: diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 44c0fdfc3ebe..faf350297025 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -332,12 +332,10 @@ bool parseParameters(ParameterList const & rInput, break; }; } - auto const ret = pOutput->insert(std::make_pair(p->m_aAttribute, - INetContentTypeParameter(p->m_aAttribute, - p->m_aCharset, - p->m_aLanguage, - aValue, - !bBadEncoding))); + auto const ret = pOutput->insert( + {p->m_aAttribute, + {p->m_aAttribute, p->m_aCharset, p->m_aLanguage, aValue, + !bBadEncoding}}); SAL_INFO_IF(!ret.second, "tools", "INetMIME: dropping duplicate parameter: " << p->m_aAttribute); p = pNext; |