From 0ca0de7698b523effaaf6cc9c608e936fa5aaf86 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 2 Dec 2014 21:55:57 +0000 Subject: useless calls of mir_*strlen in DrawText replaced with -1 git-svn-id: http://svn.miranda-ng.org/main/trunk@11223 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/mir_smileys.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'plugins/TipperYM/src') diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 2086ef13b8..35c55acf36 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -457,7 +457,6 @@ SortedList *ReplaceSmileys(const TCHAR *text, int text_size, const char *protoco List_Insert(plText, piece, plText->realCount); word_start = word_end; } - } CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)spres); @@ -467,22 +466,15 @@ SortedList *ReplaceSmileys(const TCHAR *text, int text_size, const char *protoco int DrawTextExt(HDC hdc, LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat, LPCSTR lpProto, SMILEYPARSEINFO spi) { - if ((opt.iSmileyAddFlags & SMILEYADD_ENABLE) && spi != NULL) - { + if ((opt.iSmileyAddFlags & SMILEYADD_ENABLE) && spi != NULL) { if (opt.iSmileyAddFlags & SMILEYADD_RESIZE) uFormat |= DT_RESIZE_SMILEYS; return Smileys_DrawText(hdc, lpString, nCount, lpRect, uFormat, lpProto, spi); } - else - { - if (uFormat & DT_CALCRECT) - { - return DrawText(hdc, lpString, nCount, lpRect, uFormat); - } - else - { - return DrawTextAlpha(hdc, lpString, nCount, lpRect, uFormat); - } - } + + if (uFormat & DT_CALCRECT) + return DrawText(hdc, lpString, nCount, lpRect, uFormat); + + return DrawTextAlpha(hdc, lpString, nCount, lpRect, uFormat); } -- cgit v1.2.3