summaryrefslogtreecommitdiff
path: root/stoc/source/security/lru_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/security/lru_cache.h')
-rw-r--r--stoc/source/security/lru_cache.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h
index e9bf8b5c32ed..4688dc9b3278 100644
--- a/stoc/source/security/lru_cache.h
+++ b/stoc/source/security/lru_cache.h
@@ -52,57 +52,57 @@ class lru_cache
Entry * m_block;
mutable Entry * m_head;
mutable Entry * m_tail;
- inline void toFront( Entry * entry ) const SAL_THROW(());
+ inline void toFront( Entry * entry ) const;
public:
/** Default Ctor. Does not cache.
*/
- inline lru_cache() SAL_THROW(());
+ inline lru_cache();
/** Ctor.
@param size number of elements to be cached; default param set to 128
*/
- inline lru_cache( ::std::size_t size ) SAL_THROW(());
+ inline lru_cache( ::std::size_t size );
/** Destructor: releases all cached elements and keys.
*/
- inline ~lru_cache() SAL_THROW(());
+ inline ~lru_cache();
/** Retrieves a pointer to value in cache. Returns 0, if none was found.
@param key a key
@return pointer to value or 0
*/
- inline t_val const * lookup( t_key const & key ) const SAL_THROW(());
+ inline t_val const * lookup( t_key const & key ) const;
/** Sets a value to be cached for given key.
@param key a key
@param val a value
*/
- inline void set( t_key const & key, t_val const & val ) SAL_THROW(());
+ inline void set( t_key const & key, t_val const & val );
/** Tests whether a value is cached for given key.
@param key a key
@return true, if value is cached
*/
- inline bool has( t_key const & key ) const SAL_THROW(());
+ inline bool has( t_key const & key ) const;
/** Clears the cache, releasing all cached elements and keys.
*/
- inline void clear() SAL_THROW(());
+ inline void clear();
/** Sets the number of elements to be cached. This will clear previous entries.
@param cacheSize number of elements to be cached
*/
- inline void setSize( ::std::size_t size ) SAL_THROW(());
+ inline void setSize( ::std::size_t size );
};
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::setSize(
- ::std::size_t size ) SAL_THROW(())
+ ::std::size_t size )
{
m_key2element.clear();
delete [] m_block;
@@ -124,7 +124,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::setSize(
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache(
- ::std::size_t size ) SAL_THROW(())
+ ::std::size_t size )
: m_size( 0 )
, m_block( 0 )
, m_tail( 0 )
@@ -133,7 +133,7 @@ inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache(
}
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
-inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache() SAL_THROW(())
+inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache()
: m_size( 0 )
, m_block( 0 )
, m_head( 0 )
@@ -143,14 +143,13 @@ inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lru_cache() SAL_THROW((
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline lru_cache< t_key, t_val, t_hashKey, t_equalKey >::~lru_cache()
- SAL_THROW(())
{
delete [] m_block;
}
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::toFront(
- Entry * entry ) const SAL_THROW(())
+ Entry * entry ) const
{
if (entry != m_head)
{
@@ -173,7 +172,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::toFront(
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline bool lru_cache< t_key, t_val, t_hashKey, t_equalKey >::has(
- t_key const & key ) const SAL_THROW(())
+ t_key const & key ) const
{
typename t_key2element::const_iterator const iFind( m_key2element.find( key ) );
return (iFind != m_key2element.end());
@@ -181,7 +180,7 @@ inline bool lru_cache< t_key, t_val, t_hashKey, t_equalKey >::has(
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline t_val const * lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lookup(
- t_key const & key ) const SAL_THROW(())
+ t_key const & key ) const
{
if (0 < m_size)
{
@@ -207,7 +206,7 @@ inline t_val const * lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lookup(
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
- t_key const & key, t_val const & val ) SAL_THROW(())
+ t_key const & key, t_val const & val )
{
if (0 < m_size)
{
@@ -257,7 +256,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
}
template< typename t_key, typename t_val, typename t_hashKey, typename t_equalKey >
-inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::clear() SAL_THROW(())
+inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::clear()
{
m_key2element.clear();
for ( ::std::size_t nPos = m_size; nPos--; )