reuse operator bool() check in compatibility_iterator::IndexOf() instead of rewriting it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-21 13:00:19 +00:00
parent edc0a395c6
commit 0b6cf20588

View File

@@ -191,11 +191,8 @@ private:
} \ } \
int IndexOf() const \ int IndexOf() const \
{ \ { \
return m_list ? \ return *this ? std::distance( m_list->begin(), m_iter ) \
m_iter != m_list->end() ? \ : wxNOT_FOUND; \
std::distance( m_list->begin(), m_iter ) : \
wxNOT_FOUND : \
wxNOT_FOUND; \
} \ } \
}; \ }; \
public: \ public: \