summaryrefslogtreecommitdiff
path: root/plugins/TipperYM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-02 21:55:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-02 21:55:57 +0000
commit0ca0de7698b523effaaf6cc9c608e936fa5aaf86 (patch)
tree1e6ce038dc27a1ccddb5e3f863607c83eece2e98 /plugins/TipperYM
parentaeae01dc50a5adea8fe003c8195540b1f2b2169f (diff)
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
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r--plugins/TipperYM/src/mir_smileys.cpp20
1 files changed, 6 insertions, 14 deletions
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);
}