include/xmloff/xmlement.hxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit adf0f0f103b10842b660fb94da77ead04f080907 Author: Caolán McNamara <caol...@redhat.com> Date: Sat May 6 15:22:16 2017 +0100
coverity#1403665 Unrecoverable parse warning Change-Id: Ia4e6f856dc37a2398c5bba58e77261e5e12d3c9c Reviewed-on: https://gerrit.libreoffice.org/37317 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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 }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits