diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
commit | 5ac26cff397836222eb8d51d866890f96321c601 (patch) | |
tree | 7ab4ff3ed3c36675df3d2da5a912311df499a8fa /yapp/popup_history.cpp | |
parent | 8e4bd51aa53343a76b1ddc9c7e47f3d56cb24437 (diff) |
Optimizations, removed redundant code, better compatibility with popup+
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@512 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/popup_history.cpp')
-rw-r--r-- | yapp/popup_history.cpp | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/yapp/popup_history.cpp b/yapp/popup_history.cpp index b413727..8658d6f 100644 --- a/yapp/popup_history.cpp +++ b/yapp/popup_history.cpp @@ -1,6 +1,3 @@ -#define STRICT -#define WIN32_LEAN_AND_MEAN - #include "common.h" #include "popup_history.h" @@ -28,16 +25,6 @@ void PopupHistoryList::Clear() count = 0; } -int PopupHistoryList::Count() -{ - return count; -} - -int PopupHistoryList::Size() -{ - return size; -} - void PopupHistoryList::RemoveItem(int index) { int i; @@ -51,8 +38,8 @@ void PopupHistoryList::RemoveItem(int index) void PopupHistoryList::DeleteData(int index) { PopupHistoryData *item = &historyData[index]; - free(item->titleT); - free(item->messageT); + mir_free(item->titleT); + mir_free(item->messageT); item->timestamp = 0; //invalidate item item->title = NULL; item->message = NULL; @@ -74,8 +61,8 @@ void PopupHistoryList::Add(char *title, char *message, time_t timestamp) { PopupHistoryData item = {0}; //create a history item item.timestamp = timestamp; - item.title = strdup(title); - item.message = strdup(message); + item.title = mir_strdup(title); + item.message = mir_strdup(message); AddItem(item); //add it (flags = 0) } @@ -84,8 +71,8 @@ void PopupHistoryList::Add(wchar_t *title, wchar_t *message, time_t timestamp) PopupHistoryData item = {0}; //create an unicode history item item.flags = PHDF_UNICODE; //mark it as unicode item.timestamp = timestamp; - item.titleW = _wcsdup(title); - item.messageW = _wcsdup(message); + item.titleW = mir_wstrdup(title); + item.messageW = mir_wstrdup(message); AddItem(item); //add it } @@ -98,13 +85,3 @@ PopupHistoryData *PopupHistoryList::Get(int index) return &historyData[index]; } - -int PopupHistoryList::GetRenderer() -{ - return renderer; -} - -void PopupHistoryList::SetRenderer(int newRenderer) -{ - renderer = newRenderer; -} |