Include wx/list.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: utilres.cpp
|
||||
// Name: src/gtk1/utilsres.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@@ -10,9 +10,12 @@
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/list.h"
|
||||
#endif
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/config.h"
|
||||
#include "wx/app.h"
|
||||
@@ -24,7 +27,7 @@
|
||||
bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file )
|
||||
{
|
||||
wxString filename( file );
|
||||
if (filename.IsEmpty()) filename = wxT(".wxWindows");
|
||||
if (filename.empty()) filename = wxT(".wxWindows");
|
||||
|
||||
wxFileConfig conf( wxTheApp->GetAppName(), wxTheApp->GetVendorName(), filename );
|
||||
|
||||
@@ -60,7 +63,7 @@ bool wxWriteResource(const wxString& section, const wxString& entry, int value,
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, wxChar **value, const wxString& file )
|
||||
{
|
||||
wxString filename( file );
|
||||
if (filename.IsEmpty()) filename = wxT(".wxWindows");
|
||||
if (filename.empty()) filename = wxT(".wxWindows");
|
||||
|
||||
wxFileConfig conf( wxTheApp->GetAppName(), wxTheApp->GetVendorName(), filename );
|
||||
|
||||
@@ -69,16 +72,16 @@ bool wxGetResource(const wxString& section, const wxString& entry, wxChar **valu
|
||||
wxString result;
|
||||
if (conf.Read( entry, &result ))
|
||||
{
|
||||
if (!result.IsEmpty())
|
||||
if (!result.empty())
|
||||
{
|
||||
wxChar *s = new wxChar[result.Len()+1];
|
||||
wxStrcpy( s, result.c_str() );
|
||||
*value = s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file )
|
||||
@@ -89,9 +92,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
|
||||
{
|
||||
*value = (float)wxStrtod(s, NULL);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file )
|
||||
@@ -102,9 +105,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
|
||||
{
|
||||
*value = wxStrtol(s, NULL, 10);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file )
|
||||
@@ -115,8 +118,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
||||
{
|
||||
*value = (int)wxStrtol(s, NULL, 10);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user