Nikolay Sivov : comctl32/tooltip: Compare to special callback pointer value directly.

Alexandre Julliard julliard at winehq.org
Mon Apr 30 15:12:47 CDT 2018


Module: wine
Branch: master
Commit: 5e7e3cbda6578234099909290482dcedc63cadcb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5e7e3cbda6578234099909290482dcedc63cadcb

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Apr 30 14:32:01 2018 +0300

comctl32/tooltip: Compare to special callback pointer value directly.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tooltips.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 5460101..1aa55d1 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -177,15 +177,6 @@ typedef struct
 static LRESULT CALLBACK
 TOOLTIPS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uId, DWORD_PTR dwRef);
 
-
-static inline BOOL TOOLTIPS_IsCallbackString(LPCWSTR str, BOOL isW)
-{
-    if (isW)
-      return str == LPSTR_TEXTCALLBACKW;
-    else
-      return (LPCSTR)str == LPSTR_TEXTCALLBACKA;
-}
-
 static inline UINT_PTR
 TOOLTIPS_GetTitleIconIndex(HICON hIcon)
 {
@@ -1091,7 +1082,7 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
             toolPtr->lpszText = ti->lpszText;
         }
         else if (ti->lpszText) {
-            if (TOOLTIPS_IsCallbackString(ti->lpszText, isW)) {
+            if (ti->lpszText == LPSTR_TEXTCALLBACKW) {
                 TRACE("add CALLBACK\n");
                 toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
             }
@@ -1674,7 +1665,7 @@ TOOLTIPS_SetToolInfoT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 	toolPtr->lpszText = ti->lpszText;
     }
     else {
-	if (TOOLTIPS_IsCallbackString(ti->lpszText, isW))
+	if (ti->lpszText == LPSTR_TEXTCALLBACKW)
 	    toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
 	else {
 	    if ( (toolPtr->lpszText) &&
@@ -1800,7 +1791,7 @@ TOOLTIPS_UpdateTipTextT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW
 	toolPtr->lpszText = ti->lpszText;
     }
     else if (ti->lpszText) {
-	if (TOOLTIPS_IsCallbackString(ti->lpszText, isW))
+	if (ti->lpszText == LPSTR_TEXTCALLBACKW)
 	    toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
 	else {
 	    if ( (toolPtr->lpszText)  &&




More information about the wine-cvs mailing list