From af91f717c43bc895905b7976528fe505c6a49615 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Wed, 17 Oct 2012 13:09:41 +0200 Subject: [PATCH] Change the get_text() method to return a const char* --- xml-tree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml-tree.cpp b/xml-tree.cpp index b33383e..d6b54e8 100644 --- a/xml-tree.cpp +++ b/xml-tree.cpp @@ -399,9 +399,9 @@ int32_t xml_tree::text_id(xml_tree::node_t x) const return (int32_t) text_positions->rank1(x) - 1; } -unsigned char* xml_tree::get_text(int32_t id) const +const char* xml_tree::get_text(int32_t id) const { - unsigned char * s = text_collection->GetText(id); + const char * s = static_cast(text_collection->GetText(id)); return s + (s[0] == 1); } -- 2.17.1