Applied some of patch [ 688466 ] MSVC7 build & bug fixes

by Darren Whobrey


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-04-02 11:10:37 +00:00
parent baf3431445
commit 083f7497d3
18 changed files with 53 additions and 25 deletions

View File

@@ -794,6 +794,12 @@ typedef float wxFloat32 ;
#define wxUINT64_SWAP_ON_BE(val) (val)
#endif
// Macros to convert from unsigned long to void pointer.
// High order truncation occurs if the respective type is not large enough.
#define WXPTRULONGSLICE (((wxBYTE_ORDER==wxBIG_ENDIAN)&&(sizeof(void*)==8)&&(sizeof(unsigned long)<8))?1:0)
#define wxPtrToULong(p) (((unsigned long*)(&(p)))[WXPTRULONGSLICE])
#define wxULongToPtr(p,n) (p=NULL,wxPtrToULong(p)=(unsigned long)(n),p)
// ----------------------------------------------------------------------------
// Geometric flags
// ----------------------------------------------------------------------------

View File

@@ -241,7 +241,7 @@ special characters :
*/
class wxLocalFSHandler : public wxFileSystemHandler
class WXDLLEXPORT wxLocalFSHandler : public wxFileSystemHandler
{
public:
virtual bool CanOpen(const wxString& location);

View File

@@ -179,7 +179,7 @@ public: \
CLASSNAME( size_type sz = 10, const hasher& hfun = hasher(), \
const key_equal& k_eq = key_equal(), \
const key_extractor& k_ex = key_extractor() ) \
: m_tableBuckets( GetNextPrime( sz ) ), \
: m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), \
m_items( 0 ), \
m_hasher( hfun ), \
m_equals( k_eq ), \
@@ -252,7 +252,7 @@ public: \
delete *node; \
(*node) = temp; \
if( SHOULD_SHRINK( m_tableBuckets, m_items ) ) \
ResizeTable( GetPreviousPrime( m_tableBuckets ) - 1 ); \
ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); \
return 1; \
} \
\
@@ -324,7 +324,7 @@ protected: \
\
void ResizeTable( size_t newSize ) \
{ \
newSize = GetNextPrime( newSize ); \
newSize = GetNextPrime( (unsigned long)newSize ); \
Node** srcTable = m_table; \
size_t srcBuckets = m_tableBuckets; \
m_table = (Node**)AllocTable( newSize ); \
@@ -441,7 +441,7 @@ public:
// TODO: this might not work well on architectures with 64 bit pointers but
// 32 bit longs, we should use % ULONG_MAX there
unsigned long operator()( const void* k ) const { return (unsigned long)k; }
unsigned long operator()( const void* k ) const { return (unsigned long)wxPtrToULong(k); }
wxPointerHash& operator=(const wxPointerHash&) { return *this; }
};

View File

@@ -67,7 +67,7 @@ public:
// ---------
// get number of pages in the dialog
int GetPageCount() const { return m_pages.GetCount(); }
int GetPageCount() const { return (int) m_pages.GetCount(); }
// get the panel which represents the given page
wxNotebookPage *GetPage(int nPage) { return m_pages[nPage]; }

View File

@@ -258,7 +258,7 @@ private:
bool AssignCopy(size_t, const wxChar *);
// append a (sub)string
bool ConcatSelf(int nLen, const wxChar *src);
bool ConcatSelf(size_t nLen, const wxChar *src);
// functions called before writing to the string: they copy it if there
// are other references to our data (should be the only owner when writing)

View File

@@ -77,7 +77,7 @@
#include "wx/choicdlg.h"
#include "wx/textdlg.h"
#include "wx/filedlg.h"
#include "wx/treectrl.h"
#include "wx/validate.h" // always include, even if !wxUSE_VALIDATORS
#if wxUSE_VALIDATORS