Make xml_node::value() structure consistent with set_*
This commit is contained in:
parent
e4e2259646
commit
4223b4a3f0
@ -5378,14 +5378,13 @@ namespace pugi
|
|||||||
|
|
||||||
PUGI__FN const char_t* xml_node::value() const
|
PUGI__FN const char_t* xml_node::value() const
|
||||||
{
|
{
|
||||||
if (_root)
|
if (!_root) return PUGIXML_TEXT("");
|
||||||
{
|
|
||||||
if (impl::has_value(_root) && _root->contents)
|
|
||||||
return _root->contents;
|
|
||||||
|
|
||||||
if (PUGI__NODETYPE(_root) == node_pi && static_cast<xml_node_pi_struct*>(_root)->pi_value)
|
if (impl::has_value(_root) && _root->contents)
|
||||||
return static_cast<xml_node_pi_struct*>(_root)->pi_value;
|
return _root->contents;
|
||||||
}
|
|
||||||
|
if (PUGI__NODETYPE(_root) == node_pi && static_cast<xml_node_pi_struct*>(_root)->pi_value)
|
||||||
|
return static_cast<xml_node_pi_struct*>(_root)->pi_value;
|
||||||
|
|
||||||
return PUGIXML_TEXT("");
|
return PUGIXML_TEXT("");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user