projects
/
SXSI
/
XMLTree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6865167
)
Change the get_text() method to return a const char*
author
Kim Nguyễn
<kn@lri.fr>
Wed, 17 Oct 2012 11:09:41 +0000
(13:09 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Wed, 17 Oct 2012 11:14:52 +0000
(13:14 +0200)
xml-tree.cpp
patch
|
blob
|
history
diff --git
a/xml-tree.cpp
b/xml-tree.cpp
index
b33383e
..
d6b54e8
100644
(file)
--- 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<const char*>(text_collection->GetText(id)
);
return s + (s[0] == 1);
}