X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec67cff1f6e63b3b27613a085f0492958e66a28e..90548138ac2c372ad2ba3b0c3bf570797828e2a8:/src/msw/volume.cpp?ds=sidebyside diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index 246a4c4e70..f1750775a5 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "fsvolume.h" #endif @@ -30,7 +30,9 @@ #if wxUSE_FSVOLUME #ifndef WX_PRECOMP - #include "wx/icon.h" + #if wxUSE_GUI + #include "wx/icon.h" + #endif #include "wx/intl.h" #endif // WX_PRECOMP @@ -42,6 +44,7 @@ #include "wx/volume.h" #include +#include #include "wx/msw/missing.h" #if wxUSE_BASE @@ -287,9 +290,9 @@ static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc, // Function: CompareFcn // Purpose: Used to sort the NN list alphabetically, case insensitive. //============================================================================= -static int CompareFcn(const wxString& first, const wxString& second) +static int CompareFcn(wxString* first, wxString* second) { - return wxStricmp(first.c_str(), second.c_str()); + return wxStricmp(first->c_str(), second->c_str()); } // CompareFcn //============================================================================= @@ -354,7 +357,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc, { // Found the element. Remove it or mark it mounted. if (flagsUnset & wxFS_VOL_MOUNTED) - list.Remove(iList); + list.RemoveAt(iList); else s_fileInfo[list[iList]].m_flags |= wxFS_VOL_MOUNTED; @@ -402,7 +405,7 @@ wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset) TCHAR* buf = new TCHAR[chars+1]; // Get the list of drives. - chars = GetLogicalDriveStrings(chars, buf); + GetLogicalDriveStrings(chars, buf); // Parse the list into an array, applying appropriate filters. TCHAR *pVol;