From bc65721534d60574bed36ed85100b5576a38258c Mon Sep 17 00:00:00 2001 From: paulc Date: Wed, 14 Aug 2013 13:33:43 +0000 Subject: [PATCH] Constified XmlElement::getText() git-svn-id: http://yate.null.ro/svn/yate/trunk@5625 acf43c95-373e-0410-b603-e72c3f656dc1 --- libs/yxml/XML.cpp | 4 ++-- libs/yxml/yatexml.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/yxml/XML.cpp b/libs/yxml/XML.cpp index 51e1abf9..bdb7fe87 100644 --- a/libs/yxml/XML.cpp +++ b/libs/yxml/XML.cpp @@ -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(ob->get()))->xmlText(); return txt ? txt->getText() : String::empty(); diff --git a/libs/yxml/yatexml.h b/libs/yxml/yatexml.h index da8b8850..a7ac15a4 100644 --- a/libs/yxml/yatexml.h +++ b/libs/yxml/yatexml.h @@ -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