summaryrefslogtreecommitdiff
path: root/ace/Caching_Utility_T.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-04-19 12:01:10 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-04-19 12:01:10 +0000
commitbbb960bc702217af071831ec06ff1043b8a57506 (patch)
tree5853da7ff14b0710770979f17c320ac7e4e02bcf /ace/Caching_Utility_T.cpp
parentb80aa9974bbfb99ff7dfe84bf12f6cbb73aa291c (diff)
downloadATCD-bbb960bc702217af071831ec06ff1043b8a57506.tar.gz
ChangeLogTag: Wed Apr 19 11:39:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ace/Caching_Utility_T.cpp')
-rw-r--r--ace/Caching_Utility_T.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ace/Caching_Utility_T.cpp b/ace/Caching_Utility_T.cpp
index c1b5e52993a..e7f81882af9 100644
--- a/ace/Caching_Utility_T.cpp
+++ b/ace/Caching_Utility_T.cpp
@@ -56,7 +56,7 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cac
// Calculate the no of entries to remove from the cache depending
// upon the <purge_percent>.
- size_t entries_to_remove
+ size_t const entries_to_remove
= ACE_MAX (static_cast<size_t> (1),
static_cast<size_t> (static_cast<double> (purge_percent)
/ 100 * current_map_size));
@@ -156,7 +156,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
// Calculate the no of entries to remove from the cache depending
// upon the <purge_percent>.
- size_t entries_to_remove
+ size_t const entries_to_remove
= ACE_MAX (static_cast<size_t> (1),
static_cast<size_t> (static_cast<double> (purge_percent)
/ 100 * current_map_size));
@@ -266,7 +266,8 @@ ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATO
return 0;
// Get the number of entries in the container which can be considered for purging.
- size_t available_entries = container.current_size () - this->marked_as_closed_entries_;
+ size_t const available_entries =
+ container.current_size () - this->marked_as_closed_entries_;
// Also whether the number of entries in the cache zero.
// Oops! then there is no way out but exiting.
@@ -275,7 +276,7 @@ ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATO
// Calculate the no of entries to remove from the cache depending
// upon the <purge_percent>.
- size_t entries_to_remove
+ size_t const entries_to_remove
= ACE_MAX (static_cast<size_t> (1),
static_cast<size_t> (static_cast<double> (purge_percent)
/ 100 * available_entries));