X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7dfe6f2a5112982c5acc75afdf5a41fea502ea8b..8b51786f6e56a7d8517107c8b497f0ddb07696ad:/include/wx/wxcrt.h diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index f64ca4c51f..0083ee1585 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -805,7 +805,8 @@ inline double wxStrtod(const wxString& nptr, T endptr) // note that it is important to use c_str() here and not mb_str() or // wc_str(), because we store the pointer into (possibly converted) // buffer in endptr and so it must be valid even when wxStrtod() returns - return wxStrtod((typename wxStrtoxCharType::Type)nptr.c_str(), + typedef typename wxStrtoxCharType::Type CharType; + return wxStrtod((CharType)nptr.c_str(), wxStrtoxCharType::AsPointer(endptr)); } } @@ -829,9 +830,12 @@ inline double wxStrtod(const wxCStrData& nptr, T endptr) if ( endptr == 0 ) \ return name(nptr.wx_str(), (wxStringCharType**)NULL, base); \ else \ - return name((typename wxStrtoxCharType::Type)nptr.c_str(), \ + { \ + typedef typename wxStrtoxCharType::Type CharType; \ + return name((CharType)nptr.c_str(), \ wxStrtoxCharType::AsPointer(endptr), \ base); \ + } \ } \ template \ inline rettype name(const wxCStrData& nptr, T endptr, int base) \