diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-30 19:42:10 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-30 19:42:10 +0300 |
commit | 4c0d70f527b2d1382a5d1d9c625eaf8537a25d6d (patch) | |
tree | 3e694ead31c8509d64d2c4fc15376710d3513106 /plugins/NewStory/src/history_array.cpp | |
parent | 11d58880ebb4346c5a188fdb0e6ab78cc8d31db1 (diff) |
NewStory: code cleaning
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 00854aef19..378847f142 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -46,7 +46,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) mir_snprintf(atext, 512, ("%s requested authorization"), dbe.pBlob + 8); } else { - mir_snprintf(atext, 512, ("%d requested authorization"), *(DWORD*)(dbe.pBlob)); + mir_snprintf(atext, 512, ("%d requested authorization"), *(DWORD *)(dbe.pBlob)); } aLength = lstrlenA(atext); break; @@ -60,7 +60,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) mir_snprintf(atext, 512, ("%s added you to the contact list"), dbe.pBlob + 8); } else { - mir_snprintf(atext, 512, ("%d added you to the contact list"), *(DWORD*)(dbe.pBlob)); + mir_snprintf(atext, 512, ("%d added you to the contact list"), *(DWORD *)(dbe.pBlob)); } aLength = lstrlenA(atext); break; @@ -68,15 +68,15 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) } if (atext && !wtext) { - #ifdef UNICODE +#ifdef UNICODE int bufSize = MultiByteToWideChar(CP_ACP, 0, atext, aLength + 1, 0, 0); wtext = new WCHAR[bufSize + 1]; MultiByteToWideChar(CP_ACP, 0, atext, aLength + 1, wtext, bufSize); wtext_del = true; - #else +#else this->wtext = 0; wtext_del = false; - #endif +#endif } else if (!atext && wtext) { @@ -110,7 +110,6 @@ HistoryArray::ItemData::~ItemData() // Array HistoryArray::HistoryArray() { - head = tail = 0; } HistoryArray::~HistoryArray() @@ -164,7 +163,7 @@ bool HistoryArray::addHistory(MCONTACT hContact, EventLoadMode) tail->items[i].hEvent = hEvent; ++i; - hEvent = db_event_next(hEvent, 0); + hEvent = db_event_next(hEvent, hContact); } return true; } |