summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-04-30 11:42:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-04-30 11:42:43 +0300
commita5fa770b36aad94d9f56f57212642f634c589138 (patch)
tree3798c467062ec9796177dc3fb29ce26e9b9068c0 /plugins/NewStory/src
parent541b745c3cbe85c363c02ac8846b0fe425b35f93 (diff)
minor code cleaning
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history_control.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 312f2296f8..e33d901ba3 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -335,7 +335,9 @@ static int LayoutItem(HWND hwnd, HistoryArray *items, int index)
static int PaintItem(HDC hdc, HistoryArray *items, int index, int top, int width)
{
- if (!items) return 0;
+ if (!items)
+ return 0;
+
ItemData *item = items->get(index, ItemData::ELM_DATA);
// LOGFONT lfText;
@@ -400,9 +402,7 @@ static int PaintItem(HDC hdc, HistoryArray *items, int index, int top, int width
}
if (!item->data) {
- wchar_t *buf = TplFormatString(tpl, item->hContact, item);
- item->data = MTextCreateW(htuLog, buf);
- mir_free(buf);
+ item->data = MTextCreateW(htuLog, ptrW(TplFormatString(tpl, item->hContact, item)));
if (!item->data)
return 0;
}