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:
Michael Wetherell
2006-11-10 16:00:44 +00:00
parent 4d6d8bf4fb
commit b2c31089c2

View File

@@ -1682,17 +1682,11 @@ int wxString::Find(const wxChar *pszSub) const
// the implementation of all the functions below is exactly the same so factor // the implementation of all the functions below is exactly the same so factor
// it out // it out
#ifdef __WATCOMC__ template <typename T, typename F>
#define STR2INTLINK _WCRTLINK
#else
#define STR2INTLINK
#endif
template <typename T>
bool wxStringToIntType(const wxChar *start, bool wxStringToIntType(const wxChar *start,
T *val, T *val,
int base, int base,
T STR2INTLINK (*func)(const wxChar *, wxChar **, int)) F func)
{ {
wxCHECK_MSG( val, false, _T("NULL output pointer") ); wxCHECK_MSG( val, false, _T("NULL output pointer") );
wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") ); wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") );