]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
added version checking to the renderers
[wxWidgets.git] / src / common / filename.cpp
index 125aae19f664d39eb88c9525313e8ae3fbf6403a..307018d906e7cb0c1af4d1318aac11d3db62b1b9 100644 (file)
@@ -60,7 +60,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "filename.h"
 #endif
 
@@ -1347,10 +1347,9 @@ wxString wxFileName::GetShortPath() const
         ok = ::GetShortPathName
                (
                 path,
-                pathOut.GetWriteBuf(sz),
+                wxStringBuffer(pathOut, sz),
                 sz
                ) != 0;
-        pathOut.UngetWriteBuf();
     }
     if (ok)
         return pathOut;
@@ -1406,11 +1405,9 @@ wxString wxFileName::GetLongPath() const
                         ok = (*s_pfnGetLongPathName)
                                 (
                                 path,
-                                pathOut.GetWriteBuf(sz),
+                                wxStringBuffer(pathOut, sz),
                                 sz
                                 ) != 0;
-                        pathOut.UngetWriteBuf();
-
                         success = true;
                     }
                 }
@@ -1541,7 +1538,7 @@ void wxFileName::SplitPath(const wxString& fullpathWithVolume,
                 fullpath[posFirstSlash] = wxFILE_SEP_DSK;
 
                 // UNC paths are always absolute, right? (FIXME)
-                fullpath.insert(posFirstSlash + 1, wxFILE_SEP_PATH_DOS);
+                fullpath.insert(posFirstSlash + 1, 1, wxFILE_SEP_PATH_DOS);
             }
         }
     }