From 390b1b331dc406bd37fe788b893b4e3e8535c9d9 Mon Sep 17 00:00:00 2001 From: Mataes Date: Mon, 4 Nov 2019 18:27:04 +0300 Subject: newstory: removed not used code --- plugins/NewStory/src/history_array.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'plugins/NewStory/src/history_array.cpp') diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 34b8113e64..00854aef19 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -111,14 +111,10 @@ HistoryArray::ItemData::~ItemData() HistoryArray::HistoryArray() { head = tail = 0; - caching = false; - caching_complete = true; - InitializeCriticalSection(&csItems); } HistoryArray::~HistoryArray() { - DeleteCriticalSection(&csItems); clear(); } @@ -202,34 +198,15 @@ bool HistoryArray::preloadEvents(int count) */ HistoryArray::ItemData *HistoryArray::get(int id, EventLoadMode mode) { - caching = false; - if (caching) EnterCriticalSection(&csItems); int offset = 0; for (ItemBlock *p = head; p; p = p->next) { if (id < offset + p->count) { if (mode != ELM_NOTHING) p->items[id - offset].load(mode); - if (caching) { - if (caching_complete) caching = false; - LeaveCriticalSection(&csItems); - } return p->items + id - offset; } offset += p->count; } - if (caching) { - if (caching_complete) caching = false; - LeaveCriticalSection(&csItems); - } return 0; } - -/////////////////////////////////////////////////////////// -// Cache data -void HistoryArray::CacheThreadFunc(void *arg) -{ - HistoryArray *_this = (HistoryArray *)arg; - _this->caching_complete = true; - _endthread(); -} -- cgit v1.2.3