diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-06 15:22:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-06 20:33:34 +0200 |
commit | adf0f0f103b10842b660fb94da77ead04f080907 (patch) | |
tree | f32b3ca322d786ccc29babe22c5e3b22e511b403 /include/xmloff | |
parent | f35e13ce36c857e28252f13dafb78b290a8f9bea (diff) |
coverity#1403665 Unrecoverable parse warning
Change-Id: Ia4e6f856dc37a2398c5bba58e77261e5e12d3c9c
Reviewed-on: https://gerrit.libreoffice.org/37317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/xmlement.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/xmloff/xmlement.hxx b/include/xmloff/xmlement.hxx index 5a149f6335ad..066a99c4edbc 100644 --- a/include/xmloff/xmlement.hxx +++ b/include/xmloff/xmlement.hxx @@ -39,8 +39,10 @@ public: SvXMLEnumMapEntry(::xmloff::token::XMLTokenEnum eToken_, EnumT nValue_) : eToken(eToken_), nValue(static_cast<sal_uInt16>(nValue_)) {} ::xmloff::token::XMLTokenEnum GetToken() const { return eToken; } + sal_uInt16 GetValue() const { return nValue; } }; +#if defined(_MSC_VER) // specialisation to avoid lots of "C2398: conversion from 'const sal_Int16' to 'sal_uInt16' requires a narrowing conversion" // errors when compiling on MSVC template<> @@ -55,6 +57,7 @@ public: ::xmloff::token::XMLTokenEnum GetToken() const { return eToken; } sal_uInt16 GetValue() const { return nValue; } }; +#endif #define ENUM_STRING_MAP_ENTRY(name,tok) { name, sizeof(name)-1, tok } |