diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-04 20:30:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-04 20:58:33 +0100 |
commit | 4cc2fb2db34337880393d692d0e9ea8d6496fcbf (patch) | |
tree | e9eb11f670083be4674356ce07685cbc3da3f09c /xmloff/source/core | |
parent | a6b6bb2aac59db3b390a3155ee4b25ebfef76ce9 (diff) |
coverity#1302607 Logically dead code
also
coverity#1302606 Logically dead code
Change-Id: I510f17e93f7caf5f1c35becdf6b7d626c0160b66
Diffstat (limited to 'xmloff/source/core')
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 6a97160c9f42..b355f038e9b7 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -102,10 +102,12 @@ sal_uInt16 SvXMLNamespaceMap::Add( const OUString& rPrefix, const OUString& rNam if( XML_NAMESPACE_UNKNOWN == nKey ) nKey = GetKeyByName( rName ); - assert(XML_NAMESPACE_NONE != nKey); - +#ifdef NDEBUG if( XML_NAMESPACE_NONE == nKey ) return USHRT_MAX; +#else + assert(XML_NAMESPACE_NONE != nKey); +#endif if ( aNameHash.find ( rPrefix ) == aNameHash.end() ) nKey = _Add( rPrefix, rName, nKey ); @@ -117,10 +119,12 @@ sal_uInt16 SvXMLNamespaceMap::AddIfKnown( const OUString& rPrefix, const OUStrin { sal_uInt16 nKey = GetKeyByName( rName ); - assert(nKey != XML_NAMESPACE_NONE); - +#ifdef NDEBUG if( XML_NAMESPACE_NONE == nKey ) return XML_NAMESPACE_UNKNOWN; +#else + assert(nKey != XML_NAMESPACE_NONE); +#endif if( XML_NAMESPACE_UNKNOWN != nKey ) { |