summaryrefslogtreecommitdiff
path: root/ace/Map_Manager.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-25 21:28:38 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-25 21:28:38 +0000
commitfe5ae091ea7d547c2acf17734411f5e641d85cea (patch)
treecaeed9fec5f0d5009c8a97a2544f21183214355f /ace/Map_Manager.cpp
parent7988cf012c1a788052e8abdd2adbaced536093e0 (diff)
downloadATCD-fe5ae091ea7d547c2acf17734411f5e641d85cea.tar.gz
fo
Diffstat (limited to 'ace/Map_Manager.cpp')
-rw-r--r--ace/Map_Manager.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index c448a61362c..8ef2d713b52 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -537,7 +537,8 @@ ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::ACE_Map_Iterator (ACE_Map_Manager<EXT_ID
next_ (-1)
{
ACE_TRACE ("ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::ACE_Map_Iterator");
- this->advance ();
+ if (this->map_man_.search_structure_ != 0)
+ this->advance ();
}
template <class EXT_ID, class INT_ID, class LOCK> int
@@ -546,8 +547,9 @@ ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> *&mm
ACE_TRACE ("ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::next");
ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
- // Note that this->next_ is never negative at this point...
- if (size_t (this->next_) < this->map_man_.cur_size_)
+ if (this->map_man_.search_structure_ != 0
+ // Note that this->next_ is never negative at this point...
+ && size_t (this->next_) < this->map_man_.cur_size_)
{
mm = &this->map_man_.search_structure_[this->next_];
return 1;
@@ -588,7 +590,9 @@ ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::ACE_Map_Reverse_Iterator (ACE_Ma
next_ (this->map_man_.cur_size_)
{
ACE_TRACE ("ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::ACE_Map_Reverse_Iterator");
- this->advance ();
+
+ if (this->map_man_.search_structure_ != 0)
+ this->advance ();
}
template <class EXT_ID, class INT_ID, class LOCK> int
@@ -597,7 +601,7 @@ ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::next (ACE_Map_Entry<EXT_ID, INT_
ACE_TRACE ("ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::next");
ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
- if (this->next_ >= 0)
+ if (this->map_man_.search_structure_ != 0 && this->next_ >= 0)
{
mm = &this->map_man_.search_structure_[this->next_];
return 1;