Various fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-25 12:01:23 +00:00
parent 35c9d9582b
commit 6164d85e89
12 changed files with 68 additions and 59 deletions

View File

@@ -208,15 +208,7 @@ public:
void SetRecordDefaults(bool bDoIt = TRUE) { m_bRecordDefaults = bDoIt; }
bool IsRecordingDefaults() const { return m_bRecordDefaults; }
// does expansion only if needed
wxString ExpandEnvVars(const wxString& str) const
{
wxString tmp; // Required for BC++
if (IsExpandingEnvVars())
tmp = wxExpandEnvVars(str);
else
tmp = str;
return tmp;
}
wxString ExpandEnvVars(const wxString& str) const;
// misc accessors
inline wxString GetAppName() const { return m_appName; }

View File

@@ -106,23 +106,10 @@ public:
long GetNumber() const
{ wxASSERT( m_keyType == wxKEY_INTEGER ); return m_key.integer; }
// comparaison
bool operator==(wxListKeyValue value) const
{
switch ( m_keyType )
{
default:
wxFAIL_MSG("bad key type.");
// let compiler optimize the line above away in release build
// by not putting return here...
case wxKEY_STRING:
return strcmp(m_key.string, value.string) == 0;
case wxKEY_INTEGER:
return m_key.integer == value.integer;
}
}
// comparison
// Note: implementation moved to list.cpp to prevent BC++ inline
// expansion warning.
bool operator==(wxListKeyValue value) const ;
// dtor
~wxListKey()
@@ -267,7 +254,7 @@ protected:
// this function allows the sorting of arbitrary lists by giving
// a function to compare two list elements. The list is sorted in place.
void Sort(wxSortCompareFunction compfunc);
void Sort(const wxSortCompareFunction compfunc);
// functions for iterating over the list
void *FirstThat(wxListIterateFunction func);

View File

@@ -78,16 +78,10 @@
#define wxUSE_SCROLLBAR 1
// Define 1 to compile contributed wxScrollBar class
#define wxUSE_XPM_IN_X 1
#define wxUSE_XPM_IN_MSW 1
#define wxUSE_XPM_IN_MSW 0
// Define 1 to support the XPM package in wxBitmap,
// separated by platform. If 1, you must link in
// the XPM library to your applications.
#define wxUSE_IMAGE_LOADING_IN_X 1
// Use dynamic icon/bitmap loading/saving code in utils/image under X.
// If this is 1, you will need to link your applications
// with image_X.lib. where X is motif, ol, or hp.
#define wxUSE_IMAGE_LOADING_IN_MSW 1
// Use dynamic DIB loading/saving code in utils/dib under MSW.
#define wxUSE_RESOURCE_LOADING_IN_MSW 1
@@ -96,12 +90,6 @@
#define wxUSE_WX_RESOURCES 1
// Use .wxr resource mechanism (requires PrologIO library)
#define wxUSE_GNU_WXSTRING 0
// Define 1 to use modified GNU wxString class
// from (stefan.hammes@urz.uni-heidelberg.de) in contrib\string
// TODO: why does this give an unresolved 'wxRegex::Search'
// symbol if 1?
#define HAVE_SOCKET 1
// Use WinSock if 1
#define wxUSE_DOC_VIEW_ARCHITECTURE 1

View File

@@ -61,7 +61,7 @@ protected:
static bool sm_registeredClass;
static unsigned int sm_taskbarMsg;
DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()
};

View File

@@ -108,19 +108,8 @@ public:
bool Write(Type typeNew = Type_None);
// get the file termination string
inline static const char *GetEOL(Type type = typeDefault)
{
switch ( type ) {
case Type_None: return "";
case Type_Unix: return "\n";
case Type_Dos: return "\r\n";
case Type_Mac: return "\r";
default:
wxFAIL_MSG("bad file type in wxTextFile::GetEOL.");
return (const char *) NULL;
}
}
// Note: implementation moved to textfile to prevent warning due to switch.
static const char *GetEOL(Type type = typeDefault);
// dtor
~wxTextFile();