summaryrefslogtreecommitdiff
path: root/ace/Timer_Heap.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-16 21:47:54 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-16 21:47:54 +0000
commit49d4b3b48b404fe79818c32554468ec18fdb1a64 (patch)
treece9cb4e430052d58be181369322e9044131065ca /ace/Timer_Heap.cpp
parent19b9c47b16915e2d5e04da6eaafcf36e6c98347c (diff)
downloadATCD-49d4b3b48b404fe79818c32554468ec18fdb1a64.tar.gz
use size_t instead of int for some loop indices to make sure that comparisons are always purely signed or unsigned
Diffstat (limited to 'ace/Timer_Heap.cpp')
-rw-r--r--ace/Timer_Heap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ace/Timer_Heap.cpp b/ace/Timer_Heap.cpp
index 62486736a71..b176131af75 100644
--- a/ace/Timer_Heap.cpp
+++ b/ace/Timer_Heap.cpp
@@ -44,7 +44,7 @@ ACE_Timer_Heap::ACE_Timer_Heap (size_t size,
// Initialize the "freelist," which uses negative values to
// distinguish freelist elements from "pointers" into the <heap_>
// array.
- for (int i = 0; i < size; i++)
+ for (size_t i = 0; i < size; i++)
this->timer_ids_[i] = -(i + 1);
if (preallocate)
@@ -53,7 +53,7 @@ ACE_Timer_Heap::ACE_Timer_Heap (size_t size,
ACE_Timer_Node[size]);
// Form the freelist by linking the next_ pointers together.
- for (int j = 1; j < size; j++)
+ for (size_t j = 1; j < size; j++)
this->preallocated_nodes_[j - 1].next_ =
&this->preallocated_nodes_[j];
@@ -206,7 +206,7 @@ ACE_Timer_Heap::reheap_down (ACE_Timer_Node *moved_node,
// Restore the heap property after a deletion.
- for (int child = child_index;
+ for (size_t child = child_index;
child < this->cur_size_;
child += child + 1) // Multiple child by 2 and add 1.
{
@@ -410,7 +410,7 @@ ACE_Timer_Heap::cancel (ACE_Event_Handler *handler)
// Try to locate the ACE_Timer_Node that matches the timer_id.
- for (int i = 0;
+ for (size_t i = 0;
i < this->cur_size_;
)
{