mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10874] Update ACE to v5.8.3
(based on zergtmn's repo commit 3a8c259) (based on zergtmn's repo commit 946c1a8) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c38c876b1d
commit
b8d773091a
343 changed files with 3060 additions and 7431 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Caching_Utility_T.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Caching_Utility_T.cpp 92264 2010-10-19 18:12:46Z olli $
|
||||
|
||||
#ifndef ACE_CACHING_UTILITY_T_CPP
|
||||
#define ACE_CACHING_UTILITY_T_CPP
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#include "ace/ACE.h"
|
||||
#include "ace/Min_Max.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
#include "ace/Recyclable.h"
|
||||
|
|
@ -19,7 +20,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
|
||||
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
|
||||
ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
|
||||
int delete_cleanup_strategy)
|
||||
bool delete_cleanup_strategy)
|
||||
: cleanup_strategy_ (cleanup_strategy),
|
||||
delete_cleanup_strategy_ (delete_cleanup_strategy)
|
||||
{
|
||||
|
|
@ -27,7 +28,7 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Pair_
|
|||
{
|
||||
ACE_NEW (this->cleanup_strategy_,
|
||||
CLEANUP_STRATEGY);
|
||||
this->delete_cleanup_strategy_ = 1;
|
||||
this->delete_cleanup_strategy_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cac
|
|||
double purge_percent)
|
||||
{
|
||||
// Check that the purge_percent is non-zero.
|
||||
if (purge_percent == 0)
|
||||
if (ACE::is_equal (purge_percent, 0.0))
|
||||
return 0;
|
||||
|
||||
// Get the number of entries in the container.
|
||||
|
|
@ -94,7 +95,7 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (
|
|||
// Starting values.
|
||||
ITERATOR iter = container.begin ();
|
||||
ITERATOR end = container.end ();
|
||||
ATTRIBUTES min = (*iter).int_id_.second ();
|
||||
ATTRIBUTES min = (*iter).int_id_.second;
|
||||
key_to_remove = &(*iter).ext_id_;
|
||||
value_to_remove = &(*iter).int_id_;
|
||||
|
||||
|
|
@ -104,10 +105,10 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (
|
|||
iter != end;
|
||||
++iter)
|
||||
{
|
||||
if (min > (*iter).int_id_.second ())
|
||||
if (min > (*iter).int_id_.second)
|
||||
{
|
||||
// Ah! an item with lower ATTTRIBUTES...
|
||||
min = (*iter).int_id_.second ();
|
||||
min = (*iter).int_id_.second;
|
||||
key_to_remove = &(*iter).ext_id_;
|
||||
value_to_remove = &(*iter).int_id_;
|
||||
}
|
||||
|
|
@ -118,7 +119,7 @@ ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (
|
|||
|
||||
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
|
||||
ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
|
||||
int delete_cleanup_strategy)
|
||||
bool delete_cleanup_strategy)
|
||||
: cleanup_strategy_ (cleanup_strategy),
|
||||
delete_cleanup_strategy_ (delete_cleanup_strategy)
|
||||
{
|
||||
|
|
@ -126,7 +127,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
{
|
||||
ACE_NEW (this->cleanup_strategy_,
|
||||
CLEANUP_STRATEGY);
|
||||
this->delete_cleanup_strategy_ = 1;
|
||||
this->delete_cleanup_strategy_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +143,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
double purge_percent)
|
||||
{
|
||||
// Check that the purge_percent is non-zero.
|
||||
if (purge_percent == 0)
|
||||
if (ACE::is_equal (purge_percent, 0.0))
|
||||
return 0;
|
||||
|
||||
// Get the number of entries in the container.
|
||||
|
|
@ -194,7 +195,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
// Starting values.
|
||||
ITERATOR end = container.end ();
|
||||
ITERATOR iter = container.begin ();
|
||||
ATTRIBUTES min = (*iter).int_id_.second ();
|
||||
ATTRIBUTES min = (*iter).int_id_.second;
|
||||
key_to_remove = 0;
|
||||
value_to_remove = 0;
|
||||
// Found the minimum entry to be purged?
|
||||
|
|
@ -214,7 +215,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
{
|
||||
if (found == 0)
|
||||
{
|
||||
min = (*iter).int_id_.second ();
|
||||
min = (*iter).int_id_.second;
|
||||
key_to_remove = &(*iter).ext_id_;
|
||||
value_to_remove = &(*iter).int_id_;
|
||||
found = 1;
|
||||
|
|
@ -222,9 +223,9 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
else
|
||||
{
|
||||
// Ah! an entry with lower ATTTRIBUTES...
|
||||
if (min > (*iter).int_id_.second ())
|
||||
if (min > (*iter).int_id_.second)
|
||||
{
|
||||
min = (*iter).int_id_.second ();
|
||||
min = (*iter).int_id_.second;
|
||||
key_to_remove = &(*iter).ext_id_;
|
||||
value_to_remove = &(*iter).int_id_;
|
||||
}
|
||||
|
|
@ -237,7 +238,7 @@ ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUT
|
|||
|
||||
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
|
||||
ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
|
||||
int delete_cleanup_strategy)
|
||||
bool delete_cleanup_strategy)
|
||||
: cleanup_strategy_ (cleanup_strategy),
|
||||
delete_cleanup_strategy_ (delete_cleanup_strategy),
|
||||
marked_as_closed_entries_ (0)
|
||||
|
|
@ -246,7 +247,7 @@ ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATO
|
|||
{
|
||||
ACE_NEW (this->cleanup_strategy_,
|
||||
CLEANUP_STRATEGY);
|
||||
this->delete_cleanup_strategy_ = 1;
|
||||
this->delete_cleanup_strategy_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +263,7 @@ ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATO
|
|||
double purge_percent)
|
||||
{
|
||||
// Check that the purge_percent is non-zero.
|
||||
if (purge_percent == 0)
|
||||
if (ACE::is_equal (purge_percent, 0.0))
|
||||
return 0;
|
||||
|
||||
// Get the number of entries in the container which can be considered for purging.
|
||||
|
|
@ -362,7 +363,7 @@ ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATO
|
|||
|
||||
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
|
||||
ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
|
||||
int delete_cleanup_strategy)
|
||||
bool delete_cleanup_strategy)
|
||||
: cleanup_strategy_ (cleanup_strategy),
|
||||
delete_cleanup_strategy_ (delete_cleanup_strategy)
|
||||
{
|
||||
|
|
@ -370,7 +371,7 @@ ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Ha
|
|||
{
|
||||
ACE_NEW (this->cleanup_strategy_,
|
||||
CLEANUP_STRATEGY);
|
||||
this->delete_cleanup_strategy_ = 1;
|
||||
this->delete_cleanup_strategy_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +387,7 @@ ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_
|
|||
double purge_percent)
|
||||
{
|
||||
// Check that the purge_percent is non-zero.
|
||||
if (purge_percent == 0)
|
||||
if (ACE::is_equal (purge_percent, 0.0))
|
||||
return 0;
|
||||
|
||||
// Get the number of entries in the container.
|
||||
|
|
@ -455,7 +456,7 @@ ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimu
|
|||
|
||||
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
|
||||
ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Null_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
|
||||
int delete_cleanup_strategy)
|
||||
bool delete_cleanup_strategy)
|
||||
: cleanup_strategy_ (cleanup_strategy),
|
||||
delete_cleanup_strategy_ (delete_cleanup_strategy)
|
||||
{
|
||||
|
|
@ -463,7 +464,7 @@ ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Null_
|
|||
{
|
||||
ACE_NEW (this->cleanup_strategy_,
|
||||
CLEANUP_STRATEGY);
|
||||
this->delete_cleanup_strategy_ = 1;
|
||||
this->delete_cleanup_strategy_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue