| 24 | } |
| 25 | |
| 26 | void WSITileGraphicsItemCache::get(const keyType& k, WSITileGraphicsItem*& tile, unsigned int& size) { |
| 27 | |
| 28 | std::map<keyType, std::pair<std::pair<WSITileGraphicsItem*, unsigned int>, keyTypeList::iterator> >::iterator it = _cache.find(k); |
| 29 | |
| 30 | if (it == _cache.end()) { |
| 31 | tile = NULL; |
| 32 | return; |
| 33 | } |
| 34 | else { |
| 35 | if (it->second.second != _LRU.end()) { |
| 36 | _LRU.splice( |
| 37 | _LRU.end(), |
| 38 | _LRU, |
| 39 | it->second.second |
| 40 | ); |
| 41 | } |
| 42 | tile = it->second.first.first; |
| 43 | size = it->second.first.second; |
| 44 | return; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | std::vector<WSITileGraphicsItem*> WSITileGraphicsItemCache::getAllItems() { |
| 49 | std::vector<WSITileGraphicsItem*> allItems; |
no outgoing calls
no test coverage detected