diff options
author | Jasmin Jessich <jasmin@anw.at> | 2017-04-07 21:57:05 +0200 |
---|---|---|
committer | Jasmin Jessich <jasmin@anw.at> | 2017-05-14 00:32:29 +0200 |
commit | bdee9cf2e15d0c7d61fcfe4b766fc7680a2f2e6e (patch) | |
tree | 5b95be68e79d5ce4906c47b54e8c2376a1eb59d0 | |
parent | dfe94980a0651eb4cbd308b7fb3f5a83d9cdc476 (diff) | |
download | vdr-plugin-live-bdee9cf2e15d0c7d61fcfe4b766fc7680a2f2e6e.tar.gz vdr-plugin-live-bdee9cf2e15d0c7d61fcfe4b766fc7680a2f2e6e.tar.bz2 |
Remove dead code from cache.h
-rw-r--r-- | cache.h | 40 |
1 files changed, 0 insertions, 40 deletions
@@ -28,16 +28,6 @@ public: typedef std::tr1::shared_ptr< mapped_type > ptr_type; private: - /*struct Value - { - key_type key_; - ptr_type value_; - - Value( key_type const& key, ptr_type const& value ) - : key_( key ) - , value_( value ) {} - };*/ - typedef std::pair< key_type, ptr_type > value_type; typedef std::list< value_type > ValueList; @@ -69,7 +59,6 @@ public: m_currentWeight -= result->weight(); m_values.erase( it->second ); - //m_lookup.erase( it ); } if ( !result->load() ) { @@ -97,35 +86,6 @@ public: } return result; -#if 0 - - typename KeyMap::iterator it = m_lookup.find( key ); - if ( it == m_lookup.end() ) { - typename ValueList::iterator element = m_values.insert( m_values.begin(), Value( key ) ); - std::pair< typename KeyMap::iterator, bool > result = m_lookup.insert( std::make_pair( key, element ) ); - it = result.first; - } - - Value* value = &*it->second; - std::time_t now = std::time( 0 ); - if ( value->creation == 0 || !value->value->is_current() ) { - m_currentWeight -= value->value->weight(); - if ( !value->value->load() ) { - m_values.erase( it->second ); - m_lookup.erase( it ); - return ptr_type(); - } - m_currentWeight += value->value->weight(); - value->creation = now; - } - if ( it->second != m_values.begin() ) { - typename ValueList::iterator element = m_values.insert( m_values.begin(), *it->second ); - m_values.erase( it->second ); - it->second = element; - value = &*element; - } - return value->value; -#endif } private: |