summaryrefslogtreecommitdiff
path: root/plugins/wbOSD/src
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/wbOSD/src
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/wbOSD/src')
-rw-r--r--plugins/wbOSD/src/wbOSD.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/wbOSD/src/wbOSD.cpp b/plugins/wbOSD/src/wbOSD.cpp
index da5b031aad..88b770028a 100644
--- a/plugins/wbOSD/src/wbOSD.cpp
+++ b/plugins/wbOSD/src/wbOSD.cpp
@@ -37,9 +37,6 @@ int DrawMe(HWND hwnd, TCHAR *string, COLORREF color)
HGDIOBJ oo=SelectObject(hdc, fh);
-// rect2.left=0;
-// rect2.top=0;
-// DrawText(hdc, string, -1, &rect2, DT_SINGLELINE|DT_CALCRECT);
rect2 = rect;
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|DT_CALCRECT);
@@ -77,21 +74,22 @@ int DrawMe(HWND hwnd, TCHAR *string, COLORREF color)
OffsetRect(&rect, sxo, syo);
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|talign);
- } else {
- rect2=rect;
- rect2.left+=plgs.distance;
+ }
+ else {
+ rect2 = rect;
+ rect2.left += plgs.distance;
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|talign);
- rect2=rect;
- rect2.left-=plgs.distance;
+ rect2 = rect;
+ rect2.left -= plgs.distance;
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|talign);
- rect2=rect;
- rect2.top-=plgs.distance;
+ rect2 = rect;
+ rect2.top -= plgs.distance;
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|talign);
- rect2=rect;
- rect2.top+=plgs.distance;
+ rect2 = rect;
+ rect2.top += plgs.distance;
DrawText(hdc, string, -1, &rect2, DT_WORDBREAK|talign);
OffsetRect(&rect, sxo/2, syo/2);