From: Kim Nguyễn Date: Wed, 17 Oct 2012 16:45:58 +0000 (+0200) Subject: Use reinterpret_cast to convert the unsigned char* returned X-Git-Url: http://git.nguyen.vg/gitweb/?a=commitdiff_plain;h=b9fb65602be2216e5b4545763471bcd282c1382b;hp=1ecd202ec601b601acca14ece6c9c3c9e494d68f;p=SXSI%2FXMLTree.git Use reinterpret_cast to convert the unsigned char* returned by the text collection into a const char*. --- diff --git a/xml-tree.cpp b/xml-tree.cpp index b33383e..21c77c4 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 = reinterpret_cast(text_collection->GetText(id)); return s + (s[0] == 1); }