diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-17 02:33:12 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-17 02:33:12 +0000 |
commit | 25fed67cccb91808846a26deb63e53b284937fc5 (patch) | |
tree | 61d30eeeca1b5a4dbc69927b1e235811b9026274 /ace | |
parent | 6332e26c88fe2c705ba5590e25805f53bc1c0e57 (diff) | |
download | ATCD-25fed67cccb91808846a26deb63e53b284937fc5.tar.gz |
pSOSim port
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Containers.cpp | 18 | ||||
-rw-r--r-- | ace/Map_Manager.cpp | 14 | ||||
-rw-r--r-- | ace/Mem_Map.cpp | 6 | ||||
-rw-r--r-- | ace/Message_Block.cpp | 4 |
4 files changed, 22 insertions, 20 deletions
diff --git a/ace/Containers.cpp b/ace/Containers.cpp index a7cf8a35a39..89971faa51d 100644 --- a/ace/Containers.cpp +++ b/ace/Containers.cpp @@ -1095,12 +1095,12 @@ ACE_Fixed_Set_Iterator<T, SIZE>::advance (void) ACE_TRACE ("ACE_Fixed_Set_Iterator<T, SIZE>::advance"); for (++this->next_; - size_t (this->next_) < this->s_.cur_size_ + ACE_static_cast(size_t, this->next_) < this->s_.cur_size_ && this->s_.search_structure_[this->next_].is_free_; ++this->next_) continue; - return size_t (this->next_) < this->s_.cur_size_; + return ACE_static_cast(size_t, this->next_) < this->s_.cur_size_; } template <class T, size_t SIZE> int @@ -1108,14 +1108,14 @@ ACE_Fixed_Set_Iterator<T, SIZE>::done (void) const { ACE_TRACE ("ACE_Fixed_Set_Iterator<T, SIZE>::done"); - return size_t (this->next_) >= this->s_.cur_size_; + return ACE_static_cast(size_t, this->next_) >= this->s_.cur_size_; } template <class T, size_t SIZE> int ACE_Fixed_Set_Iterator<T, SIZE>::next (T *&item) { ACE_TRACE ("ACE_Fixed_Set_Iterator<T, SIZE>::next"); - if (size_t (this->next_) < this->s_.cur_size_) + if (ACE_static_cast(size_t, this->next_) < this->s_.cur_size_) { item = &this->s_.search_structure_[this->next_].item_; return 1; @@ -1142,7 +1142,7 @@ ACE_Bounded_Set<T>::~ACE_Bounded_Set (void) template <class T> ACE_Bounded_Set<T>::ACE_Bounded_Set (void) : cur_size_ (0), - max_size_ (size_t (ACE_Bounded_Set<T>::DEFAULT_SIZE)) + max_size_ (ACE_static_cast(size_t, ACE_Bounded_Set<T>::DEFAULT_SIZE)) { ACE_TRACE ("ACE_Bounded_Set<T>::ACE_Bounded_Set"); @@ -1299,12 +1299,12 @@ ACE_Bounded_Set_Iterator<T>::advance (void) ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::advance"); for (++this->next_; - size_t (this->next_) < this->s_.cur_size_ + ACE_static_cast(size_t, this->next_) < this->s_.cur_size_ && this->s_.search_structure_[this->next_].is_free_; ++this->next_) continue; - return size_t (this->next_) < this->s_.cur_size_; + return ACE_static_cast(size_t, this->next_) < this->s_.cur_size_; } template <class T> int @@ -1312,14 +1312,14 @@ ACE_Bounded_Set_Iterator<T>::done (void) const { ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::done"); - return size_t (this->next_) >= this->s_.cur_size_; + return ACE_static_cast(size_t, this->next_) >= this->s_.cur_size_; } template <class T> int ACE_Bounded_Set_Iterator<T>::next (T *&item) { ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::next"); - if (size_t (this->next_) < this->s_.cur_size_) + if (ACE_static_cast(size_t, this->next_) < this->s_.cur_size_) { item = &this->s_.search_structure_[this->next_].item_; return 1; diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp index a188659556b..debb7d7de62 100644 --- a/ace/Map_Manager.cpp +++ b/ace/Map_Manager.cpp @@ -536,7 +536,8 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK> size_t ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::current_size (void) { ACE_TRACE ("ACE_Map_Manager::current_size"); - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, (size_t) -1); + ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, + ACE_static_cast(size_t, -1)); return this->cur_size_; } @@ -544,7 +545,8 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK> size_t ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::total_size (void) { ACE_TRACE ("ACE_Map_Manager::total_size"); - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, (size_t) -1); + ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, + ACE_static_cast(size_t, -1)); return this->total_size_; } @@ -578,7 +580,7 @@ ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> 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_) + && ACE_static_cast(size_t, this->next_) < this->map_man_.cur_size_) { mm = &this->map_man_.search_structure_[this->next_]; return 1; @@ -595,7 +597,7 @@ ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::done (void) const return 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_; + || ACE_static_cast(size_t, this->next_) >= this->map_man_.cur_size_; } template <class EXT_ID, class INT_ID, class ACE_LOCK> int @@ -605,11 +607,11 @@ ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::advance (void) ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->map_man_.lock_, -1); for (++this->next_; - size_t (this->next_) < this->map_man_.cur_size_ + ACE_static_cast(size_t, this->next_) < this->map_man_.cur_size_ && this->map_man_.search_structure_[this->next_].is_free_; this->next_++) continue; - return size_t (this->next_) < this->map_man_.cur_size_; + return ACE_static_cast(size_t, this->next_) < this->map_man_.cur_size_; } ACE_ALLOC_HOOK_DEFINE(ACE_Map_Reverse_Iterator) diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp index e412eb956fd..5f482ab33e8 100644 --- a/ace/Mem_Map.cpp +++ b/ace/Mem_Map.cpp @@ -65,7 +65,7 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, if (file_len == -1) return -1; - if (this->length_ < size_t (file_len)) + if (this->length_ < ACE_static_cast(size_t, file_len)) { // If the length of the mapped region is less than the length of // the file then we force a complete new remapping by setting @@ -75,13 +75,13 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, } // At this point we know <file_len> is not negative... - this->length_ = size_t (file_len); + this->length_ = ACE_static_cast(size_t, file_len); if (len_request == -1) len_request = 0; if ((this->length_ == 0 && len_request > 0) - || this->length_ < size_t (len_request)) + || this->length_ < ACE_static_cast(size_t, len_request)) { this->length_ = len_request; diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp index 22338005ee4..31d86595042 100644 --- a/ace/Message_Block.cpp +++ b/ace/Message_Block.cpp @@ -31,7 +31,7 @@ ACE_Message_Block::copy (const char *buf, size_t n) { ACE_TRACE ("ACE_Message_Block::copy"); // Note that for this to work correct, end() *must* be >= wr_ptr(). - size_t len = size_t (this->end () - this->wr_ptr ()); + size_t len = ACE_static_cast(size_t, this->end () - this->wr_ptr ()); if (len < n) return -1; @@ -48,7 +48,7 @@ ACE_Message_Block::copy (const char *buf) { ACE_TRACE ("ACE_Message_Block::copy"); // Note that for this to work correct, end() *must* be >= wr_ptr(). - size_t len = size_t (this->end () - this->wr_ptr ()); + size_t len = ACE_static_cast(size_t, (this->end () - this->wr_ptr ())); size_t buflen = ACE_OS::strlen (buf) + 1; if (len < buflen) |