Value type for the cache. More...
Public Member Functions | |
tvalue (const surface &surf) | |
Public Attributes | |
const surface | surf |
The cached image. More... | |
unsigned | age |
The age of the image. More... | |
Value type for the cache.
Definition at line 92 of file minimap.cpp.
|
inline |
Definition at line 94 of file minimap.cpp.
unsigned gui2::tvalue::age |
The age of the image.
Every time an image is used its age is increased by one. Once the cache is full 25% of the cache is emptied. This is done by halving the age of the items in the cache and then erase the 25% with the lowest age. If items have the same age their order is unspecified.
Definition at line 109 of file minimap.cpp.
const surface gui2::tvalue::surf |
The cached image.
Definition at line 99 of file minimap.cpp.