From 6d56eb5c56fb1f5707727e86a615e270d4dddbfe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 26 Apr 2001 16:38:11 +0000 Subject: [PATCH] applied patch 417699 (remove WXDLLEXPORT from inline functions) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/app.h | 2 +- include/wx/longlong.h | 18 +++++++++--------- include/wx/msw/dib.h | 9 ++++++--- include/wx/string.h | 14 +++++++------- include/wx/window.h | 2 +- include/wx/wxchar.h | 4 ++-- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/include/wx/app.h b/include/wx/app.h index 46bde888f1..c25f74ae29 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -326,7 +326,7 @@ extern void WXDLLEXPORT wxWakeUpIdle(); // Post a message to the given eventhandler which will be processed during the // next event loop iteration -inline void WXDLLEXPORT wxPostEvent(wxEvtHandler *dest, wxEvent& event) +inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event) { wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") ); diff --git a/include/wx/longlong.h b/include/wx/longlong.h index e5f82a5f7a..0945d472cb 100644 --- a/include/wx/longlong.h +++ b/include/wx/longlong.h @@ -512,14 +512,14 @@ private: // binary operators // ---------------------------------------------------------------------------- -inline bool WXDLLEXPORT operator<(long l, const wxLongLong& ll) { return ll > l; } -inline bool WXDLLEXPORT operator>(long l, const wxLongLong& ll) { return ll > l; } -inline bool WXDLLEXPORT operator<=(long l, const wxLongLong& ll) { return ll > l; } -inline bool WXDLLEXPORT operator>=(long l, const wxLongLong& ll) { return ll > l; } -inline bool WXDLLEXPORT operator==(long l, const wxLongLong& ll) { return ll > l; } -inline bool WXDLLEXPORT operator!=(long l, const wxLongLong& ll) { return ll > l; } - -inline wxLongLong WXDLLEXPORT operator+(long l, const wxLongLong& ll) { return ll + l; } -inline wxLongLong WXDLLEXPORT operator-(long l, const wxLongLong& ll) { return ll - l; } +inline bool operator<(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator>(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator<=(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator>=(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator==(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator!=(long l, const wxLongLong& ll) { return ll > l; } + +inline wxLongLong operator+(long l, const wxLongLong& ll) { return ll + l; } +inline wxLongLong operator-(long l, const wxLongLong& ll) { return ll - l; } #endif // _WX_LONGLONG_H diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index dce72a1404..dd68491a02 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -15,6 +15,9 @@ class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxPalette; +// WARNING: these functions are private to wxWindows and shouldn't be used +// by the user code, they risk to disappear in the next versions! + // ---------------------------------------------------------------------------- // Functions for working with DIBs // ---------------------------------------------------------------------------- @@ -29,8 +32,8 @@ extern bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel, extern void wxFreeDIB(LPBITMAPINFO lpDIBHeader); // defined in ole/dataobj.cpp -extern size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap); -extern wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi); +extern WXDLLEXPORT size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap); +extern WXDLLEXPORT wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi); // the rest is defined in dib.cpp @@ -38,7 +41,7 @@ extern wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi); bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap = NULL); // Load device independent bitmap into device dependent bitmap -wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **colourmap = NULL); +wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **colourmap = NULL); // Load into existing bitmap; bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal = NULL); diff --git a/include/wx/string.h b/include/wx/string.h index 49c27ba2f7..0a59b4123e 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -120,14 +120,14 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // backwards compatibility only. // checks whether the passed in pointer is NULL and if the string is empty -inline bool WXDLLEXPORT IsEmpty(const char *p) { return (!p || !*p); } +inline bool IsEmpty(const char *p) { return (!p || !*p); } // safe version of strlen() (returns 0 if passed NULL pointer) -inline size_t WXDLLEXPORT Strlen(const char *psz) +inline size_t Strlen(const char *psz) { return psz ? strlen(psz) : 0; } // portable strcasecmp/_stricmp -inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2) +inline int Stricmp(const char *psz1, const char *psz2) { #if defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) ) return _stricmp(psz1, psz2); @@ -1126,14 +1126,14 @@ wxString WXDLLEXPORT operator+(wxChar ch, const wxString& string); wxString WXDLLEXPORT operator+(const wxString& string, const wxChar *psz); wxString WXDLLEXPORT operator+(const wxChar *psz, const wxString& string); #if wxUSE_UNICODE -inline wxString WXDLLEXPORT operator+(const wxString& string, const wxWCharBuffer& buf) +inline wxString operator+(const wxString& string, const wxWCharBuffer& buf) { return string + (const wchar_t *)buf; } -inline wxString WXDLLEXPORT operator+(const wxWCharBuffer& buf, const wxString& string) +inline wxString operator+(const wxWCharBuffer& buf, const wxString& string) { return (const wchar_t *)buf + string; } #else // !wxUSE_UNICODE -inline wxString WXDLLEXPORT operator+(const wxString& string, const wxCharBuffer& buf) +inline wxString operator+(const wxString& string, const wxCharBuffer& buf) { return string + (const char *)buf; } -inline wxString WXDLLEXPORT operator+(const wxCharBuffer& buf, const wxString& string) +inline wxString operator+(const wxCharBuffer& buf, const wxString& string) { return (const char *)buf + string; } #endif // wxUSE_UNICODE/!wxUSE_UNICODE diff --git a/include/wx/window.h b/include/wx/window.h index 2fc3e20a8a..fe9d83b8ab 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -921,7 +921,7 @@ WXDLLEXPORT extern wxWindow* wxFindWindowAtPointer(wxPoint& pt); WXDLLEXPORT extern wxPoint wxGetMousePosition(); // deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId() -inline WXDLLEXPORT int NewControlId() { return wxWindowBase::NewControlId(); } +inline int NewControlId() { return wxWindowBase::NewControlId(); } #endif // _WX_WINDOW_H_BASE_ diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 2bd6a65114..31658ced47 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -511,11 +511,11 @@ typedef unsigned __WCHAR_TYPE__ wxUChar; #endif // checks whether the passed in pointer is NULL and if the string is empty -WXDLLEXPORT inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } +inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } #ifndef wxNEED_WX_STRING_H // safe version of strlen() (returns 0 if passed NULL pointer) -WXDLLEXPORT inline size_t wxStrlen(const wxChar *psz) +inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; } #endif -- 2.45.2