[Libreoffice-commits] libvisio.git: src/lib
David Tardon
dtardon at redhat.com
Wed Jun 4 08:56:13 PDT 2014
src/lib/VSDXMLHelper.cpp | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
New commits:
commit e8f0de8e6e69551fa54cf43ee0ab93ed22d9d5d5
Author: David Tardon <dtardon at redhat.com>
Date: Wed Jun 4 17:54:50 2014 +0200
coverity#1165322 unreachable return statement
Change-Id: I8a4f55921ed71c55fb615b5c27daf80008608e09
diff --git a/src/lib/VSDXMLHelper.cpp b/src/lib/VSDXMLHelper.cpp
index a09c5db..4180316 100644
--- a/src/lib/VSDXMLHelper.cpp
+++ b/src/lib/VSDXMLHelper.cpp
@@ -139,21 +139,17 @@ long libvisio::xmlStringToLong(const xmlChar *s)
return 0;
}
-double libvisio::xmlStringToDouble(const xmlChar *s)
+double libvisio::xmlStringToDouble(const xmlChar *s) try
{
if (xmlStrEqual(s, BAD_CAST("Themed")))
return 0.0;
- try
- {
- return boost::lexical_cast<double, const char *>((const char *)s);
- }
- catch (const boost::bad_lexical_cast &)
- {
- VSD_DEBUG_MSG(("Throwing XmlParserException\n"));
- throw XmlParserException();
- }
- return 0.0;
+ return boost::lexical_cast<double, const char *>((const char *)s);
+}
+catch (const boost::bad_lexical_cast &)
+{
+ VSD_DEBUG_MSG(("Throwing XmlParserException\n"));
+ throw XmlParserException();
}
bool libvisio::xmlStringToBool(const xmlChar *s)
More information about the Libreoffice-commits
mailing list