Nikolay Sivov : comctl32/treeview: Activate tree verification only when TRACE() is on.
Alexandre Julliard
julliard at winehq.org
Tue Jun 8 10:08:23 CDT 2010
Module: wine
Branch: master
Commit: 767754031dc37a41d62718cdede5bdcf062d4972
URL: http://source.winehq.org/git/wine.git/?a=commit;h=767754031dc37a41d62718cdede5bdcf062d4972
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Jun 8 01:07:06 2010 +0400
comctl32/treeview: Activate tree verification only when TRACE() is on.
---
dlls/comctl32/treeview.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index f1ff9c5..b3c283d 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -213,21 +213,11 @@ static VOID TREEVIEW_UpdateScrollBars(TREEVIEW_INFO *infoPtr);
static LRESULT TREEVIEW_HScroll(TREEVIEW_INFO *, WPARAM);
/* Random Utilities *****************************************************/
-
-#ifndef NDEBUG
-static inline void
-TREEVIEW_VerifyTree(TREEVIEW_INFO *infoPtr)
-{
- (void)infoPtr;
-}
-#else
-/* The definition is at the end of the file. */
static void TREEVIEW_VerifyTree(TREEVIEW_INFO *infoPtr);
-#endif
/* Returns the treeview private data if hwnd is a treeview.
* Otherwise returns an undefined value. */
-static TREEVIEW_INFO *
+static inline TREEVIEW_INFO *
TREEVIEW_GetInfoPtr(HWND hwnd)
{
return (TREEVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
@@ -5818,7 +5808,6 @@ TREEVIEW_Unregister(void)
/* Tree Verification ****************************************************/
-#ifdef NDEBUG
static inline void
TREEVIEW_VerifyChildren(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item);
@@ -5905,8 +5894,8 @@ TREEVIEW_VerifyRoot(TREEVIEW_INFO *infoPtr)
static void
TREEVIEW_VerifyTree(TREEVIEW_INFO *infoPtr)
{
- assert(infoPtr != NULL);
+ if (!TRACE_ON(treeview)) return;
+ assert(infoPtr != NULL);
TREEVIEW_VerifyRoot(infoPtr);
}
-#endif
More information about the wine-cvs
mailing list