]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utils.cpp
fixed crash introduced by recently applied autowidth patch (patch 1171455)
[wxWidgets.git] / src / os2 / utils.cpp
index f7798795906fe1a102a838ede6afff0fc769187c..1ee5362ef432108a6173e2d15ae2dd0950d40f01 100644 (file)
@@ -220,12 +220,12 @@ wxBatteryState wxGetBatteryState()
 wxMemorySize wxGetFreeMemory()
 {
     void*                           pMemptr = NULL;
-    ULONG                           lSize;
+    LONG                            lSize;
     ULONG                           lMemFlags;
     APIRET                          rc;
 
     lMemFlags = PAG_FREE;
-    rc = ::DosQueryMem(pMemptr, &lSize, &lMemFlags);
+    rc = ::DosQueryMem(pMemptr, (PULONG)&lSize, &lMemFlags);
     if (rc != 0)
         lSize = -1L;
     return (wxMemorySize)lSize;
@@ -431,7 +431,7 @@ wxChar* wxGetUserHome (
 
     char *wxBuffer = new wxChar[256];
 #ifndef __EMX__
-    if (sUser1 != _T(""))
+    if (!sUser1.empty())
     {
         wxChar                      zTmp[64];
 
@@ -453,7 +453,7 @@ wxChar* wxGetUserHome (
         }
     }
 #endif
-    if (sUser1 == _T(""))
+    if (sUser1.empty())
     {
         if ((zHome = wxGetenv(_T("HOME"))) != NULL)
         {
@@ -468,13 +468,6 @@ wxChar* wxGetUserHome (
     return NULL; // No home known!
 }
 
-bool wxDirExists(
-  const wxString&                   rDir
-)
-{
-    return (::DosSetCurrentDir(WXSTRINGCAST rDir));
-}
-
 wxString WXDLLEXPORT wxPMErrorToStr(
   ERRORID                           vError
 )