From: Vadim Zeitlin Date: Sun, 17 Feb 2002 22:44:40 +0000 (+0000) Subject: compilation warnings fixed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/89c986535cce1ea3963507870614d2174dcac0f6?ds=inline compilation warnings fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index 11fcf168e5..dacb7542a2 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -410,8 +410,7 @@ wxArrayString wxFSVolume::GetVolumes(int flagsSet, int flagsUnset) wxArrayString nn; if (BuildRemoteList(nn, 0, flagsSet, flagsUnset)) { - int idx; - for (idx = 0; idx < nn.GetCount(); idx++) + for (size_t idx = 0; idx < nn.GetCount(); idx++) list.Add(nn[idx]); } } @@ -537,14 +536,9 @@ int wxFSVolume::GetFlags() const //============================================================================= wxIcon wxFSVolume::GetIcon(wxFSIconType type) const { - wxASSERT(type < m_icons.GetCount()); - - if (type >= m_icons.GetCount()) - { - wxLogError(_("Invalid request for icon type!")); - wxIcon null; - return null; - } + wxCHECK_MSG( type >= 0 && (size_t)type < m_icons.GetCount(), + wxIcon(), + _T("invalid icon index") ); // Load on demand. if (m_icons[type].IsNull())