From b5a512c01e08924cbc5b2a8b90444975663c49d8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Jun 2015 15:12:19 +0200 Subject: [PATCH] Fix harmless signed/unsigned comparison warning in wxMSW wxTreeCtrl. Don't cast NMHDR::code field to int, this cast was added in the previous millennium, probably to work around the wrong definition of NM_DBLCLK in some ancient MinGW headers, but nowadays all MinGW distributions (tested with MinGW 4.8.1, MinGW-64 4.9.1 and TDM-GCC 4.9.2) define it correctly and so using this cast results in a warning -- just remove it to get rid of it. --- src/msw/treectrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index c7497c8aa1..88637e1ced 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -3645,7 +3645,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( MSWIsOnItem(tvhti.flags) ) { event.m_item = tvhti.hItem; - eventType = (int)hdr->code == NM_DBLCLK + eventType = hdr->code == NM_DBLCLK ? wxEVT_TREE_ITEM_ACTIVATED : wxEVT_TREE_ITEM_RIGHT_CLICK;