summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_viewmodebar.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-11 19:31:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-11 19:31:45 +0000
commit29d0fd99991e9deaae5787b4568b407c50630f84 (patch)
tree66ca2181b7b4840de2b7afb1ff4bdd3578a1325c /plugins/Clist_modern/src/modern_viewmodebar.cpp
parentbd4c78f20e084ccdd20c05d1420c06969bc44925 (diff)
old nasty perversion with dynamically created lists removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@8562 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_viewmodebar.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 4ed058faf3..014d00b4ed 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -1394,14 +1394,11 @@ void ApplyViewMode(const char *Name, bool onlySelector )
if (g_CluiData.filterFlags & CLVM_USELASTMSG)
{
- DWORD unit;
- int i;
BYTE bSaved = g_CluiData.bSortByOrder[0];
g_CluiData.bSortByOrder[0] = SORTBY_LASTMSG;
- for (i=0; i < clistCache->realCount; i++)
- {
- ClcCacheEntry *pdnce = (ClcCacheEntry *)clistCache->items[i];
+ for (int i=0; i < clistCache.getCount(); i++) {
+ ClcCacheEntry *pdnce = clistCache[i];
pdnce->dwLastMsgTime = CompareContacts2_getLMTime(pdnce->hContact);
}
g_CluiData.bSortByOrder[0] = bSaved;
@@ -1413,7 +1410,8 @@ void ApplyViewMode(const char *Name, bool onlySelector )
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG_NEWERTHAN;
else
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG_OLDERTHAN;
- unit = LOWORD(g_CluiData.lastMsgFilter);
+
+ DWORD unit = LOWORD(g_CluiData.lastMsgFilter);
switch(HIBYTE(HIWORD(g_CluiData.lastMsgFilter))) {
case 0:
unit *= 60;