Make the function passed to wxStringToIntType a template parameter instead of
assuming its type. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1682,17 +1682,11 @@ int wxString::Find(const wxChar *pszSub) const
|
||||
// the implementation of all the functions below is exactly the same so factor
|
||||
// it out
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define STR2INTLINK _WCRTLINK
|
||||
#else
|
||||
#define STR2INTLINK
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
template <typename T, typename F>
|
||||
bool wxStringToIntType(const wxChar *start,
|
||||
T *val,
|
||||
int base,
|
||||
T STR2INTLINK (*func)(const wxChar *, wxChar **, int))
|
||||
F func)
|
||||
{
|
||||
wxCHECK_MSG( val, false, _T("NULL output pointer") );
|
||||
wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") );
|
||||
|
Reference in New Issue
Block a user