| 60 | } |
| 61 | |
| 62 | int CSnapshot::GetItemIndex(int Key) const |
| 63 | { |
| 64 | // TODO: OPT: this should not be a linear search. very bad |
| 65 | for(int i = 0; i < m_NumItems; i++) |
| 66 | { |
| 67 | if(GetItem(i)->Key() == Key) |
| 68 | return i; |
| 69 | } |
| 70 | return -1; |
| 71 | } |
| 72 | |
| 73 | void CSnapshot::InvalidateItem(int Index) |
| 74 | { |