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:
0371d84
)
Remove suprious debugging macros.
author
Kim Nguyễn
<kn@lri.fr>
Thu, 12 Apr 2012 14:30:54 +0000
(16:30 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Thu, 12 Apr 2012 14:30:54 +0000
(16:30 +0200)
xml-tree-inc.hpp
patch
|
blob
|
history
diff --git
a/xml-tree-inc.hpp
b/xml-tree-inc.hpp
index
cd8db71
..
f8ee8b0
100644
(file)
--- a/
xml-tree-inc.hpp
+++ b/
xml-tree-inc.hpp
@@
-7,17
+7,6
@@
#include <cstdio>
#include <cstdio>
-#if 0
-#define ASSERT_NODE(orig, res) do { \
- if (res < -1 || res >= par->n|| (res != -1 && res < orig)) \
- fprintf(stderr, \
- "Assertion failure: original node %i, result %i, line %i\n", \
- orig, res, __LINE__); \
- } while (0)
-#else
-#define ASSERT_NODE(orig, res)
-#endif
-
inline uint32_t xml_tree::size() const
{
return tag_seq_len / 2;
inline uint32_t xml_tree::size() const
{
return tag_seq_len / 2;
@@
-100,7
+89,6
@@
inline xml_tree::node_t xml_tree::parent(xml_tree::node_t x) const
inline xml_tree::node_t xml_tree::first_child(node_t x) const
{
xml_tree::node_t result = bp_first_child(this->par, x);
inline xml_tree::node_t xml_tree::first_child(node_t x) const
{
xml_tree::node_t result = bp_first_child(this->par, x);
- ASSERT_NODE(x, result);
return result;
}
return result;
}
@@
-115,7
+103,6
@@
inline xml_tree::node_t xml_tree::last_child(xml_tree::node_t x) const
inline xml_tree::node_t xml_tree::next_sibling(xml_tree::node_t x) const
{
xml_tree::node_t result = bp_next_sibling(this->par, x);
inline xml_tree::node_t xml_tree::next_sibling(xml_tree::node_t x) const
{
xml_tree::node_t result = bp_next_sibling(this->par, x);
- ASSERT_NODE(x, result);
return result;
}
return result;
}
@@
-185,8
+172,6
@@
inline xml_tree::node_t xml_tree::tagged_child(xml_tree::node_t x,
return c;
else
return tagged_sibling(c, t);
return c;
else
return tagged_sibling(c, t);
- /* ASSERT_NODE(x, result);
- return result;*/
}
inline xml_tree::node_t xml_tree::tagged_sibling(xml_tree::node_t x,
}
inline xml_tree::node_t xml_tree::tagged_sibling(xml_tree::node_t x,
@@
-196,13
+181,10
@@
inline xml_tree::node_t xml_tree::tagged_sibling(xml_tree::node_t x,
xml_tree::tag_t stag;
while (sibling != xml_tree::NIL) {
stag = tag(sibling);
xml_tree::tag_t stag;
while (sibling != xml_tree::NIL) {
stag = tag(sibling);
- if (stag == t) {
- ASSERT_NODE(x, sibling);
+ if (stag == t)
return sibling;
return sibling;
- }
sibling = next_sibling(sibling);
};
sibling = next_sibling(sibling);
};
- ASSERT_NODE(x, sibling);
return sibling;
}
return sibling;
}