gcc compile fixes

This commit is contained in:
Peter Schojer 2007-11-05 07:34:09 +00:00
parent c3c422d87d
commit ae34e0ff3b

View File

@ -1,7 +1,7 @@
// //
// AccessExpireStrategy.h // AccessExpireStrategy.h
// //
// $Id: //poco/Main/Foundation/include/Poco/AccessExpireStrategy.h#2 $ // $Id: //poco/Main/Foundation/include/Poco/AccessExpireStrategy.h#3 $
// //
// Library: Foundation // Library: Foundation
// Package: Cache // Package: Cache
@ -61,7 +61,7 @@ class AccessExpireStrategy: public ExpireStrategy<TKey, TValue>
/// An AccessExpireStrategy implements time and access based expiration of cache entries /// An AccessExpireStrategy implements time and access based expiration of cache entries
{ {
public: public:
AccessExpireStrategy(Timestamp::TimeDiff expireTimeInMilliSec): ExpireStrategy(expireTimeInMilliSec) AccessExpireStrategy(Timestamp::TimeDiff expireTimeInMilliSec): ExpireStrategy<TKey, TValue>(expireTimeInMilliSec)
/// Create an expire strategy. Note that the smallest allowed caching time is 25ms. /// Create an expire strategy. Note that the smallest allowed caching time is 25ms.
/// Anything lower than that is not useful with current operating systems. /// Anything lower than that is not useful with current operating systems.
{ {
@ -74,13 +74,13 @@ public:
void onGet(const void*, const TKey& key) void onGet(const void*, const TKey& key)
{ {
// get triggers an update to the expiration time // get triggers an update to the expiration time
Iterator it = _keys.find(key); typename ExpireStrategy<TKey, TValue>::Iterator it = this->_keys.find(key);
if (it != _keys.end()) if (it != this->_keys.end())
{ {
_keyIndex.erase(it->second); this->_keyIndex.erase(it->second);
Timestamp now; Timestamp now;
IndexIterator itIdx = typename ExpireStrategy<TKey, TValue>::IndexIterator itIdx =
_keyIndex.insert(typename TimeIndex::value_type(now, key)); this->_keyIndex.insert(typename ExpireStrategy<TKey, TValue>::TimeIndex::value_type(now, key));
it->second = itIdx; it->second = itIdx;
} }
} }