]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Remove unnecessary configure options from wxOSX install.txt.
[wxWidgets.git] / src / common / utilscmn.cpp
index 1dae85d7f0adb7482d63eb6dfe316495bd37643c..147b3748b554ddd4f244642379b6a63b6624f19d 100644 (file)
@@ -551,6 +551,11 @@ bool wxGetEnvMap(wxEnvVariableHashMap *map)
     wxCHECK_MSG( map, false, wxS("output pointer can't be NULL") );
 
 #if defined(__VISUALC__)
+    // This variable only exists to force the CRT to fill the wide char array,
+    // it might only have it in narrow char version until now as we use main()
+    // (and not _wmain()) as our entry point.
+    static wxChar* s_dummyEnvVar = _tgetenv(wxT("TEMP"));
+
     wxChar **env = _tenviron;
 #elif defined(__VMS)
    // Now this routine wil give false for OpenVMS
@@ -1184,22 +1189,22 @@ wxString wxStripMenuCodes(const wxString& in, int flags)
     size_t len = in.length();
     out.reserve(len);
 
-    for ( size_t n = 0; n < len; n++ )
+    for ( wxString::const_iterator it = in.begin(); it != in.end(); ++it )
     {
-        wxChar ch = in[n];
+        wxChar ch = *it;
         if ( (flags & wxStrip_Mnemonics) && ch == wxT('&') )
         {
             // skip it, it is used to introduce the accel char (or to quote
             // itself in which case it should still be skipped): note that it
             // can't be the last character of the string
-            if ( ++n == len )
+            if ( ++it == in.end() )
             {
                 wxLogDebug(wxT("Invalid menu string '%s'"), in.c_str());
             }
             else
             {
                 // use the next char instead
-                ch = in[n];
+                ch = *it;
             }
         }
         else if ( (flags & wxStrip_Accel) && ch == wxT('\t') )
@@ -1275,7 +1280,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
     // Hack for wxNotebook case: at least in wxGTK, all pages
     // claim to be shown, so we must only deal with the selected one.
 #if wxUSE_NOTEBOOK
-    if (win->IsKindOf(CLASSINFO(wxNotebook)))
+    if (wxDynamicCast(win, wxNotebook))
     {
       wxNotebook* nb = (wxNotebook*) win;
       int sel = nb->GetSelection();