]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[wxWidgets.git] / src / common / fileconf.cpp
index 1b0eb091a3d7e7be5d1d8973a03a907f055e6936..553a3f445befeef3cb5eadccb9d7a6d29f132e46 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
+// For compilers that support precompilation, includes "wx.h".
 #include  "wx/wxprec.h"
 
 #ifdef    __BORLANDC__
-  #pragma hdrstop
+    #pragma hdrstop
 #endif  //__BORLANDC__
 
 #if wxUSE_CONFIG && wxUSE_FILECONFIG
 
 #ifndef   WX_PRECOMP
-  #include  "wx/string.h"
-  #include  "wx/intl.h"
+    #include  "wx/dynarray.h"
+    #include  "wx/string.h"
+    #include  "wx/intl.h"
+    #include  "wx/log.h"
+    #include  "wx/app.h"
+    #include  "wx/utils.h"    // for wxGetHomeDir
+    #if wxUSE_STREAMS
+        #include  "wx/stream.h"
+    #endif // wxUSE_STREAMS
 #endif  //WX_PRECOMP
 
-#include  "wx/app.h"
-#include  "wx/dynarray.h"
 #include  "wx/file.h"
-#include  "wx/log.h"
 #include  "wx/textfile.h"
 #include  "wx/memtext.h"
 #include  "wx/config.h"
 #include  "wx/fileconf.h"
 #include  "wx/filefn.h"
 
-#if wxUSE_STREAMS
-    #include  "wx/stream.h"
-#endif // wxUSE_STREAMS
-
-#include  "wx/utils.h"    // for wxGetHomeDir
-
 #if defined(__WXMAC__)
-  #include  "wx/mac/private.h"  // includes mac headers
-  #include  "wx/filename.h"     // for MacSetTypeAndCreator
+    #include  "wx/mac/private.h"  // includes mac headers
+    #include  "wx/filename.h"     // for MacSetTypeAndCreator
 #endif
 
 #if defined(__WXMSW__)
-  #include "wx/msw/private.h"
+    #include "wx/msw/private.h"
 #endif  //windows.h
 #if defined(__WXPM__)
-  #define INCL_DOS
-  #include <os2.h>
+    #define INCL_DOS
+    #include <os2.h>
 #endif
 
 #include  <stdlib.h>
@@ -69,7 +68,7 @@
 // ----------------------------------------------------------------------------
 
 #ifndef MAX_PATH
-  #define MAX_PATH 512
+    #define MAX_PATH 512
 #endif
 
 #define FILECONF_TRACE_MASK _T("fileconf")
@@ -283,7 +282,7 @@ wxString wxFileConfig::GetGlobalDir()
         strDir.Printf(wxT("%c:\\OS2\\"), 'A'+drive-1);
     }
 #elif defined(__WXSTUBS__)
-    wxASSERT_MSG( false, wxT("TODO") ) ;
+    wxFAIL_MSG( wxT("TODO") );
 #elif defined(__DOS__)
     // There's no such thing as global cfg dir in MS-DOS, let's return
     // current directory (FIXME_MGL?)
@@ -571,6 +570,8 @@ wxFileConfig::~wxFileConfig()
     Flush();
 
     CleanUp();
+
+    delete m_conv;
 }
 
 // ----------------------------------------------------------------------------
@@ -1899,20 +1900,20 @@ void wxFileConfigEntry::SetValue(const wxString& strValue, bool bUser)
 
 int CompareEntries(wxFileConfigEntry *p1, wxFileConfigEntry *p2)
 {
-  #if wxCONFIG_CASE_SENSITIVE
+#if wxCONFIG_CASE_SENSITIVE
     return wxStrcmp(p1->Name(), p2->Name());
-  #else
+#else
     return wxStricmp(p1->Name(), p2->Name());
-  #endif
+#endif
 }
 
 int CompareGroups(wxFileConfigGroup *p1, wxFileConfigGroup *p2)
 {
-  #if wxCONFIG_CASE_SENSITIVE
+#if wxCONFIG_CASE_SENSITIVE
     return wxStrcmp(p1->Name(), p2->Name());
-  #else
+#else
     return wxStricmp(p1->Name(), p2->Name());
-  #endif
+#endif
 }
 
 // ----------------------------------------------------------------------------