dbertoni 2004/10/17 13:37:44
Modified: c/src/xalanc/Include XalanMap.hpp
Log:
A bit more const-correctness.
Revision Changes Path
1.10 +5 -4 xml-xalan/c/src/xalanc/Include/XalanMap.hpp
Index: XalanMap.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanMap.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XalanMap.hpp 17 Oct 2004 16:13:48 -0000 1.9
+++ XalanMap.hpp 17 Oct 2004 20:37:44 -0000 1.10
@@ -290,12 +290,13 @@
{
if (!m_buckets.empty())
{
- size_type index = doHash(key);
+ const size_type index = doHash(key);
+ assert(index < m_buckets.size());
iterator bucketPos = m_buckets[index];
while (bucketPos != m_entries.end() &&
- bucketPos->bucketIndex == index)
+ bucketPos->bucketIndex == index)
{
if (m_equals(key,bucketPos->first))
{
@@ -335,7 +336,7 @@
void insert(const key_type& key, const data_type& data)
{
- iterator pos = find(key);
+ const const_iterator pos = find(key);
if (pos == end())
{
@@ -354,7 +355,7 @@
size_type erase(const key_type& key)
{
- iterator pos = find(key);
+ const iterator pos = find(key);
if (pos != end())
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]