[libxml++/libxml++-2-40] Element: Remove redundant null check
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++/libxml++-2-40] Element: Remove redundant null check
- Date: Thu, 5 Nov 2015 09:37:53 +0000 (UTC)
commit 6db95ba02919d4cbf52f60378ea4e575290e9ea7
Author: Renu Tyagi <renu tyagi samsung com>
Date: Thu Nov 5 10:34:09 2015 +0100
Element: Remove redundant null check
Bug #757515
libxml++/nodes/element.cc | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/libxml++/nodes/element.cc b/libxml++/nodes/element.cc
index 23cb41a..35d2e8e 100644
--- a/libxml++/nodes/element.cc
+++ b/libxml++/nodes/element.cc
@@ -248,16 +248,13 @@ void Element::set_namespace_declaration(const Glib::ustring& ns_uri, const Glib:
Glib::ustring Element::get_namespace_uri_for_prefix(const Glib::ustring& ns_prefix) const
{
Glib::ustring result;
-
+
//Find the namespace:
const auto ns = xmlSearchNs( cobj()->doc, const_cast<xmlNode*>(cobj()), (xmlChar*)ns_prefix.c_str() );
- if(ns)
- {
- //Get the namespace URI associated with this prefix:
- if(ns && ns->href)
- result = (const char*)ns->href;
- }
-
+ //Get the namespace URI associated with this prefix:
+ if (ns && ns->href)
+ result = (const char*)ns->href;
+
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]