]> git.saurik.com Git - wxWidgets.git/commitdiff
Make the function passed to wxStringToIntType a template parameter instead of
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Fri, 10 Nov 2006 16:00:44 +0000 (16:00 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Fri, 10 Nov 2006 16:00:44 +0000 (16:00 +0000)
assuming its type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index 8a722a4f4c264727ac131d364b98ff2245b64b52..7d77c76f8f9a188f70129eb8571bf3e82546c8d1 100644 (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
 // 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") );