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/Quotes/src/Chart.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Quotes') diff --git a/plugins/Quotes/src/Chart.h b/plugins/Quotes/src/Chart.h index 8c40a4dfff..4e00d3cba4 100644 --- a/plugins/Quotes/src/Chart.h +++ b/plugins/Quotes/src/Chart.h @@ -91,7 +91,7 @@ public: HFONT hOldFont = static_cast(::SelectObject(hdc,hFont)); LPCTSTR pszText = TranslateT("There is no to show"); - int nDrawTextResult = ::DrawText(hdc,pszText,::mir_tstrlen(pszText),&rc,DT_SINGLELINE|DT_VCENTER|DT_CENTER); + int nDrawTextResult = ::DrawText(hdc, pszText, -1, &rc, DT_SINGLELINE | DT_VCENTER | DT_CENTER); assert(0 != nDrawTextResult); ::SelectObject(hdc,hOldFont); @@ -132,7 +132,7 @@ private: y_val = m_MinY + ((m_MaxY-m_MinY)/number_of_lines); nXIndent += 2; rc.left += nXIndent; - for(int y = rc.bottom-step;y > rc.top;y-=step,y_val+=((m_MaxY-m_MinY)/number_of_lines)) + for (int y = rc.bottom-step;y > rc.top;y-=step,y_val+=((m_MaxY-m_MinY)/number_of_lines)) { tstring sY = TYConverter::ToString(y_val); SIZE sizeText = {0,0}; @@ -140,7 +140,7 @@ private: assert(TRUE == bResult); RECT rcText = {rc.left-nXIndent,y-(sizeText.cy/2),rc.left-1,y+(sizeText.cy/2)}; - int nDrawTextResult = ::DrawText(hdc, sY.c_str(), (int)sY.size(), &rcText, DT_SINGLELINE|DT_VCENTER|DT_RIGHT); + int nDrawTextResult = ::DrawText(hdc, sY.c_str(), -1, &rcText, DT_SINGLELINE|DT_VCENTER|DT_RIGHT); assert(0 != nDrawTextResult); bResult = ::MoveToEx(hdc,rc.left,y,NULL); -- cgit v1.2.3