From 20aed026475a23a931556bb9da6f59e7af6b5ff2 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Tue, 17 Jun 2003 18:09:55 +0000
Subject: [PATCH] fixed compilation warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/menucmn.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp
index 69d5bf1ee9..5e9ea0f289 100644
--- a/src/common/menucmn.cpp
+++ b/src/common/menucmn.cpp
@@ -523,11 +523,10 @@ wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const
 // find by position
 wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const
 {
-    wxASSERT ( position > -1 && position < m_items.GetCount() );
-    if ( position > -1 && position < m_items.GetCount() )
-        return m_items.Item( position )->GetData();
-    else
-        return NULL;
+    wxCHECK_MSG( position < m_items.GetCount(), NULL,
+                 _T("wxMenu::FindItemByPosition(): invalid menu index") );
+
+    return m_items.Item( position )->GetData();
 }
 
 // ----------------------------------------------------------------------------
-- 
2.49.0