summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_array.cpp
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2019-11-04 18:27:04 +0300
committerMataes <mataes2007@gmail.com>2019-11-04 18:27:04 +0300
commit390b1b331dc406bd37fe788b893b4e3e8535c9d9 (patch)
tree297ec5d8d9700c82fc28fb8a19833c23924d2b23 /plugins/NewStory/src/history_array.cpp
parent7da34568ebe51547af1fc75afc6841168de3fd93 (diff)
newstory: removed not used code
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r--plugins/NewStory/src/history_array.cpp23
1 files changed, 0 insertions, 23 deletions
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();
-}