diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-04-24 22:36:46 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-04-24 22:36:46 +0000 |
commit | 91a8bd260d74d9d9e31e9353a45149a988cf130f (patch) | |
tree | 9d36c6363ee39689c290d73a367eb1bc572aa7dd /ace/Map_Manager.cpp | |
parent | c134523593e74051154044b554d9d0de71d626a4 (diff) | |
download | ATCD-91a8bd260d74d9d9e31e9353a45149a988cf130f.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Map_Manager.cpp')
-rw-r--r-- | ace/Map_Manager.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp index 08899981fde..96639b94df5 100644 --- a/ace/Map_Manager.cpp +++ b/ace/Map_Manager.cpp @@ -194,6 +194,13 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::shared_find (const EXT_ID &ext_id, return -1; } +template <class EXT_ID, class INT_ID, class LOCK> int +ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::equal (const EXT_ID &id1, + const EXT_ID &id2) +{ + return id1 == id2; +} + // Find the <int_id> corresponding to the <ext_id>. template <class EXT_ID, class INT_ID, class LOCK> int @@ -206,7 +213,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::shared_find (const EXT_ID &ext_id) const ACE_Map_Entry<EXT_ID, INT_ID> &ss = this->search_structure_[i]; - if (ss.is_free_ == 0 && ss.ext_id_ == ext_id) + if (ss.is_free_ == 0 && this->equal (ss.ext_id_, ext_id)) // We found it! return i; } @@ -227,8 +234,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::shared_bind (const EXT_ID &ext_id, ACE_Map_Entry<EXT_ID, INT_ID> &ss = this->search_structure_[first_free]; - ss.ext_id_ = ext_id; - ss.int_id_ = int_id; + ss.ext_id_ = ext_id; + ss.int_id_ = int_id; ss.is_free_ = 0; this->allocator_->sync ((void *) &this->search_structure_[first_free], sizeof ss); return 0; @@ -244,8 +251,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::shared_bind (const EXT_ID &ext_id, ACE_Map_Entry<EXT_ID, INT_ID> &ss = this->search_structure_[this->cur_size_]; - ss.int_id_ = int_id; - ss.ext_id_ = ext_id; + ss.int_id_ = int_id; + ss.ext_id_ = ext_id; ss.is_free_ = 0; this->allocator_->sync ((void *) &this->search_structure_[this->cur_size_], sizeof ss); this->cur_size_++; @@ -426,7 +433,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::shared_unbind (const EXT_ID &ext_id) { ACE_Map_Entry<EXT_ID, INT_ID> &ss = this->search_structure_[i]; - if (ss.is_free_ == 0 && ss.ext_id_ == ext_id) + if (ss.is_free_ == 0 && this->equal (ss.ext_id_, ext_id)) { size_t index = i; |