Constified XmlElement::getText()

git-svn-id: http://yate.null.ro/svn/yate/trunk@5625 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2013-08-14 13:33:43 +00:00
parent 15e97a941f
commit bc65721534
2 changed files with 3 additions and 3 deletions

View File

@ -1824,9 +1824,9 @@ void XmlElement::addInheritedNs(const NamedList& list)
}
// Obtain the first text of this xml element
const String& XmlElement::getText()
const String& XmlElement::getText() const
{
XmlText* txt = 0;
const XmlText* txt = 0;
for (ObjList* ob = getChildren().skipNull(); ob && !txt; ob = ob->skipNext())
txt = (static_cast<XmlChild*>(ob->get()))->xmlText();
return txt ? txt->getText() : String::empty();

View File

@ -1370,7 +1370,7 @@ public:
/**
* @return The first XmlText found in this XmlElement children
*/
const String& getText();
const String& getText() const;
/**
* Add a text child