summaryrefslogtreecommitdiff
path: root/src/pugixpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixpath.cpp')
-rw-r--r--src/pugixpath.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp
index 6239ed2..80368ff 100644
--- a/src/pugixpath.cpp
+++ b/src/pugixpath.cpp
@@ -792,9 +792,10 @@ namespace pugi
return size() == 0;
}
- xpath_node xpath_node_set::operator[](size_t index) const
+ const xpath_node& xpath_node_set::operator[](size_t index) const
{
- return (index >= size()) ? xpath_node() : m_begin[index];
+ assert(index < size());
+ return m_begin[index];
}
xpath_node_set::iterator xpath_node_set::mut_begin()