replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -633,7 +633,7 @@ protected:
|
||||
//
|
||||
// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
|
||||
// console mode it does nothing at all
|
||||
#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
|
||||
#define wxTheApp static_cast<wxApp*>(wxApp::GetInstance())
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global functions
|
||||
@@ -710,7 +710,7 @@ public:
|
||||
wxAppInitializer \
|
||||
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
||||
DECLARE_APP(appname) \
|
||||
appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
|
||||
appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); }
|
||||
|
||||
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
|
||||
// wxUniversal builds
|
||||
|
@@ -98,7 +98,7 @@ int name::Index(const T& Item, bool bFromEnd) const \
|
||||
size_t ui = size() - 1; \
|
||||
do { \
|
||||
if ( (T*)base_array::operator[](ui) == &Item ) \
|
||||
return wx_static_cast(int, ui); \
|
||||
return static_cast<int>(ui); \
|
||||
ui--; \
|
||||
} \
|
||||
while ( ui != 0 ); \
|
||||
@@ -107,7 +107,7 @@ int name::Index(const T& Item, bool bFromEnd) const \
|
||||
else { \
|
||||
for( size_t ui = 0; ui < size(); ui++ ) { \
|
||||
if( (T*)base_array::operator[](ui) == &Item ) \
|
||||
return wx_static_cast(int, ui); \
|
||||
return static_cast<int>(ui); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
|
@@ -108,7 +108,7 @@ extern WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
|
||||
|
||||
inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t)
|
||||
{
|
||||
return wx_static_cast(int, s) == wx_static_cast(int, t);
|
||||
return static_cast<int>(s) == static_cast<int>(t);
|
||||
}
|
||||
|
||||
inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t)
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
{
|
||||
wxCharTypeBuffer buf;
|
||||
if ( str )
|
||||
buf.m_data = new Data(wx_const_cast(CharType*, str), Data::NonOwned);
|
||||
buf.m_data = new Data(const_cast<CharType*>(str), Data::NonOwned);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
CharType * const p = m_data->Get();
|
||||
|
||||
wxCharTypeBuffer *self = wx_const_cast(wxCharTypeBuffer*, this);
|
||||
wxCharTypeBuffer *self = const_cast<wxCharTypeBuffer*>(this);
|
||||
self->m_data->Set(NULL);
|
||||
self->DecRef();
|
||||
|
||||
|
@@ -133,7 +133,7 @@ private:
|
||||
wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
|
||||
_T("can't mix different types of client data") );
|
||||
|
||||
return AppendItems(items, wx_reinterpret_cast(void **, clientData),
|
||||
return AppendItems(items, reinterpret_cast<void **>(clientData),
|
||||
wxClientData_Object);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ private:
|
||||
_T("can't mix different types of client data") );
|
||||
|
||||
return InsertItems(items, pos,
|
||||
wx_reinterpret_cast(void **, clientData),
|
||||
reinterpret_cast<void **>(clientData),
|
||||
wxClientData_Object);
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ typedef int wxEventType;
|
||||
|
||||
// this is used to make the event table entry type safe, so that for an event
|
||||
// handler only a function with proper parameter list can be given.
|
||||
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
|
||||
#define wxStaticCastEvent(type, val) static_cast<type>(val)
|
||||
|
||||
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||
wxEventTableEntry(type, winid, idLast, fn, obj)
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
{
|
||||
// the cast here is safe because the derived classes always create
|
||||
// wxGDIRefData objects
|
||||
return m_refData && wx_static_cast(wxGDIRefData *, m_refData)->IsOk();
|
||||
return m_refData && static_cast<wxGDIRefData *>(m_refData)->IsOk();
|
||||
}
|
||||
|
||||
// don't use in the new code, use IsOk() instead
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const
|
||||
{
|
||||
return CloneGDIRefData(wx_static_cast(const wxGDIRefData *, data));
|
||||
return CloneGDIRefData(static_cast<const wxGDIRefData *>(data));
|
||||
}
|
||||
|
||||
virtual wxGDIRefData *CreateGDIRefData() const = 0;
|
||||
|
@@ -913,9 +913,9 @@ public:
|
||||
// would break the existing code overriding them, so instead we provide
|
||||
// these const synonyms which can be used from const-correct code
|
||||
int GetRowsCount() const
|
||||
{ return wx_const_cast(wxGridTableBase *, this)->GetNumberRows(); }
|
||||
{ return const_cast<wxGridTableBase *>(this)->GetNumberRows(); }
|
||||
int GetColsCount() const
|
||||
{ return wx_const_cast(wxGridTableBase *, this)->GetNumberCols(); }
|
||||
{ return const_cast<wxGridTableBase *>(this)->GetNumberCols(); }
|
||||
|
||||
|
||||
virtual bool IsEmptyCell( int row, int col ) = 0;
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
// needed for old GCC
|
||||
wxBitmap(char** data)
|
||||
{ *this = wxBitmap(wx_const_cast(const char* const*, data)); }
|
||||
{ *this = wxBitmap(const_cast<const char* const*>(data)); }
|
||||
#endif
|
||||
wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
|
||||
#if wxUSE_IMAGE
|
||||
|
@@ -195,8 +195,8 @@ private:
|
||||
// both
|
||||
void *GetTextObject() const
|
||||
{
|
||||
return IsMultiLine() ? wx_static_cast(void *, m_buffer)
|
||||
: wx_static_cast(void *, m_text);
|
||||
return IsMultiLine() ? static_cast<void *>(m_buffer)
|
||||
: static_cast<void *>(m_text);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
// needed for old GCC
|
||||
wxBitmap(char** data)
|
||||
{
|
||||
*this = wxBitmap(wx_const_cast(const char* const*, data));
|
||||
*this = wxBitmap(const_cast<const char* const*>(data));
|
||||
}
|
||||
#endif
|
||||
wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
|
||||
|
@@ -161,7 +161,7 @@ public: \
|
||||
public: \
|
||||
Node( const value_type& value ) \
|
||||
: m_value( value ) {} \
|
||||
Node* next() { return wx_static_cast(Node*, m_next); } \
|
||||
Node* next() { return static_cast<Node*>(m_next); } \
|
||||
\
|
||||
value_type m_value; \
|
||||
}; \
|
||||
@@ -169,7 +169,7 @@ public: \
|
||||
protected: \
|
||||
static void DeleteNode( _wxHashTable_NodeBase* node ) \
|
||||
{ \
|
||||
delete wx_static_cast(Node*, node); \
|
||||
delete static_cast<Node*>(node); \
|
||||
} \
|
||||
public: \
|
||||
/* */ \
|
||||
@@ -183,7 +183,7 @@ public: \
|
||||
\
|
||||
Iterator() : m_node(NULL), m_ht(NULL) {} \
|
||||
Iterator( Node* node, const Self* ht ) \
|
||||
: m_node(node), m_ht(wx_const_cast(Self*, ht)) {} \
|
||||
: m_node(node), m_ht(const_cast<Self*>(ht)) {} \
|
||||
bool operator ==( const Iterator& it ) const \
|
||||
{ return m_node == it.m_node; } \
|
||||
bool operator !=( const Iterator& it ) const \
|
||||
@@ -195,7 +195,7 @@ public: \
|
||||
for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) \
|
||||
{ \
|
||||
if( m_ht->m_table[i] ) \
|
||||
return wx_static_cast(Node*, m_ht->m_table[i]); \
|
||||
return static_cast<Node*>(m_ht->m_table[i]); \
|
||||
} \
|
||||
return NULL; \
|
||||
} \
|
||||
@@ -226,7 +226,7 @@ public: \
|
||||
const_iterator() : Iterator() {} \
|
||||
const_iterator(iterator i) : Iterator(i) {} \
|
||||
const_iterator( Node* node, const Self* ht ) \
|
||||
: Iterator(node, wx_const_cast(Self*, ht)) {} \
|
||||
: Iterator(node, const_cast<Self*>(ht)) {} \
|
||||
const_iterator& operator++() { PlusPlus();return *this; } \
|
||||
const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } \
|
||||
const_reference operator *() const { return m_node->m_value; } \
|
||||
@@ -295,9 +295,9 @@ public: \
|
||||
const_iterator end() const { return const_iterator(NULL, this); } \
|
||||
iterator end() { return iterator(NULL, this); } \
|
||||
const_iterator begin() const \
|
||||
{ return const_iterator(wx_static_cast(Node*, GetFirstNode(m_tableBuckets, m_table)), this); } \
|
||||
{ return const_iterator(static_cast<Node*>(GetFirstNode(m_tableBuckets, m_table)), this); } \
|
||||
iterator begin() \
|
||||
{ return iterator(wx_static_cast(Node*, GetFirstNode(m_tableBuckets, m_table)), this); } \
|
||||
{ return iterator(static_cast<Node*>(GetFirstNode(m_tableBuckets, m_table)), this); } \
|
||||
\
|
||||
size_type erase( const const_key_type& key ) \
|
||||
{ \
|
||||
@@ -308,7 +308,7 @@ public: \
|
||||
\
|
||||
--m_items; \
|
||||
_wxHashTable_NodeBase* temp = (*node)->m_next; \
|
||||
delete wx_static_cast(Node*, *node); \
|
||||
delete static_cast<Node*>(*node); \
|
||||
(*node) = temp; \
|
||||
if( SHOULD_SHRINK( m_tableBuckets, m_items ) ) \
|
||||
ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); \
|
||||
@@ -327,7 +327,7 @@ protected: \
|
||||
{ \
|
||||
const const_key_type& key = m_getKey( value ); \
|
||||
size_t bucket = m_hasher( key ) % m_tableBuckets; \
|
||||
Node* node = wx_static_cast(Node*, m_table[bucket]); \
|
||||
Node* node = static_cast<Node*>(m_table[bucket]); \
|
||||
\
|
||||
while( node ) \
|
||||
{ \
|
||||
@@ -367,7 +367,7 @@ protected: \
|
||||
\
|
||||
while( *node ) \
|
||||
{ \
|
||||
if (m_equals(m_getKey(wx_static_cast(Node*, *node)->m_value), key)) \
|
||||
if (m_equals(m_getKey(static_cast<Node*>(*node)->m_value), key)) \
|
||||
return node; \
|
||||
node = &(*node)->m_next; \
|
||||
} \
|
||||
@@ -380,7 +380,7 @@ protected: \
|
||||
Node* GetNode( const const_key_type& key ) const \
|
||||
{ \
|
||||
size_t bucket = m_hasher( key ) % m_tableBuckets; \
|
||||
Node* node = wx_static_cast(Node*, m_table[bucket]); \
|
||||
Node* node = static_cast<Node*>(m_table[bucket]); \
|
||||
\
|
||||
while( node ) \
|
||||
{ \
|
||||
@@ -433,7 +433,7 @@ public: \
|
||||
typedef const VALUE_T const_t2; \
|
||||
\
|
||||
CLASSNAME(const const_t1& f, const const_t2& s) \
|
||||
: first(wx_const_cast(t1&, f)), second(wx_const_cast(t2&, s)) {} \
|
||||
: first(const_cast<t1&>(f)), second(const_cast<t2&>(s)) {} \
|
||||
\
|
||||
t1 first; \
|
||||
t2 second; \
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
unsigned long operator()( short x ) const { return (unsigned long)x; }
|
||||
unsigned long operator()( unsigned short x ) const { return x; }
|
||||
#if defined wxLongLong_t && !defined wxLongLongIsLong
|
||||
wxULongLong_t operator()( wxLongLong_t x ) const { return wx_static_cast(wxULongLong_t, x); }
|
||||
wxULongLong_t operator()( wxLongLong_t x ) const { return static_cast<wxULongLong_t>(x); }
|
||||
wxULongLong_t operator()( wxULongLong_t x ) const { return x; }
|
||||
#endif
|
||||
|
||||
|
@@ -233,8 +233,8 @@ public:
|
||||
bool Create( const char* const* xpmData );
|
||||
#ifdef __BORLANDC__
|
||||
// needed for Borland 5.5
|
||||
wxImage( char** xpmData ) { Create(wx_const_cast(const char* const*, xpmData)); }
|
||||
bool Create( char** xpmData ) { return Create(wx_const_cast(const char* const*, xpmData)); }
|
||||
wxImage( char** xpmData ) { Create(const_cast<const char* const*>(xpmData)); }
|
||||
bool Create( char** xpmData ) { return Create(const_cast<const char* const*>(xpmData)); }
|
||||
#endif
|
||||
void Destroy();
|
||||
|
||||
|
@@ -457,7 +457,7 @@ protected:
|
||||
virtual void DeleteData() { }
|
||||
public:
|
||||
// for wxList::iterator
|
||||
void** GetDataPtr() const { return &(wx_const_cast(wxNodeBase*, this)->m_data); }
|
||||
void** GetDataPtr() const { return &(const_cast<wxNodeBase*>(this)->m_data); }
|
||||
private:
|
||||
// optional key stuff
|
||||
wxListKeyValue m_key;
|
||||
|
@@ -403,7 +403,7 @@ public:
|
||||
const wxString& GetLabel() const { return m_item.m_text; }
|
||||
const wxString& GetText() const { return m_item.m_text; }
|
||||
int GetImage() const { return m_item.m_image; }
|
||||
long GetData() const { return wx_static_cast(long, m_item.m_data); }
|
||||
long GetData() const { return static_cast<long>(m_item.m_data); }
|
||||
long GetMask() const { return m_item.m_mask; }
|
||||
const wxListItem& GetItem() const { return m_item; }
|
||||
|
||||
|
@@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
// (non const) "char *" but many Motif functions take "char *" parameters which
|
||||
// are really "const char *" so use this macro to suppress the warnings when we
|
||||
// know it's ok
|
||||
#define wxMOTIF_STR(x) wx_const_cast(char *, x)
|
||||
#define wxMOTIF_STR(x) const_cast<char *>(x)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Miscellaneous functions
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxBitmap(char** data)
|
||||
{
|
||||
*this = wxBitmap(wx_const_cast(const char* const*, data));
|
||||
*this = wxBitmap(const_cast<const char* const*>(data));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -56,7 +56,7 @@ protected:
|
||||
static bool CallHtmlHelp(wxWindow *win, const wxChar *str,
|
||||
unsigned cmd, const void *param = NULL)
|
||||
{
|
||||
return CallHtmlHelp(win, str, cmd, wx_reinterpret_cast(WXWPARAM, param));
|
||||
return CallHtmlHelp(win, str, cmd, reinterpret_cast<WXWPARAM>(param));
|
||||
}
|
||||
|
||||
// even simpler wrappers using GetParentWindow() and GetValidFilename() as
|
||||
@@ -69,7 +69,7 @@ protected:
|
||||
|
||||
bool CallHtmlHelp(unsigned cmd, const void *param = NULL)
|
||||
{
|
||||
return CallHtmlHelp(cmd, wx_reinterpret_cast(WXWPARAM, param));
|
||||
return CallHtmlHelp(cmd, reinterpret_cast<WXWPARAM>(param));
|
||||
}
|
||||
|
||||
// wrapper around CallHtmlHelp(HH_DISPLAY_TEXT_POPUP): only one of text and
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
// from XPM data
|
||||
wxIcon(const char* const* data) { CreateIconFromXpm(data); }
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char **data) { CreateIconFromXpm(wx_const_cast(const char* const*, data)); }
|
||||
wxIcon(char **data) { CreateIconFromXpm(const_cast<const char* const*>(data)); }
|
||||
#endif
|
||||
// from resource/file
|
||||
wxIcon(const wxString& name,
|
||||
|
@@ -930,7 +930,7 @@ extern WXDLLIMPEXP_CORE wxWindow* wxFindWinFromHandle(HWND hwnd);
|
||||
// without STRICT WXHWND is the same as HWND anyhow
|
||||
inline wxWindow* wxFindWinFromHandle(WXHWND hWnd)
|
||||
{
|
||||
return wxFindWinFromHandle(wx_static_cast(HWND, hWnd));
|
||||
return wxFindWinFromHandle(static_cast<HWND>(hWnd));
|
||||
}
|
||||
|
||||
// find the window for HWND which is part of some wxWindow, i.e. unlike
|
||||
|
@@ -29,7 +29,7 @@ class WXDLLIMPEXP_BASE wxStackFrame : public wxStackFrameBase
|
||||
{
|
||||
private:
|
||||
wxStackFrame *ConstCast() const
|
||||
{ return wx_const_cast(wxStackFrame *, this); }
|
||||
{ return const_cast<wxStackFrame *>(this); }
|
||||
|
||||
size_t DoGetParamCount() const { return m_paramTypes.GetCount(); }
|
||||
|
||||
@@ -65,7 +65,7 @@ protected:
|
||||
// helper for debug API: it wants to have addresses as DWORDs
|
||||
size_t GetSymAddr() const
|
||||
{
|
||||
return wx_reinterpret_cast(size_t, m_address);
|
||||
return reinterpret_cast<size_t>(m_address);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
HWND operator[](size_t n) const
|
||||
{
|
||||
return wx_const_cast(wxSubwindows *, this)->Get(n);
|
||||
return const_cast<wxSubwindows *>(this)->Get(n);
|
||||
}
|
||||
|
||||
// initialize the given window: id will be stored in wxWindowIDRef ensuring
|
||||
|
@@ -319,8 +319,8 @@ name##PluginSentinel m_pluginsentinel;
|
||||
// be replaced by it as long as there are any compilers not supporting it
|
||||
#define wxDynamicCast(obj, className) \
|
||||
((className *) wxCheckDynamicCast( \
|
||||
wx_const_cast(wxObject *, wx_static_cast(const wxObject *, \
|
||||
wx_const_cast(className *, wx_static_cast(const className *, obj)))), \
|
||||
const_cast<wxObject *>(static_cast<const wxObject *>(\
|
||||
const_cast<className *>(static_cast<const className *>(obj)))), \
|
||||
&className::ms_classInfo))
|
||||
|
||||
// The 'this' pointer is always true, so use this version
|
||||
@@ -339,7 +339,7 @@ inline void* wxCheckCast(void *ptr)
|
||||
|
||||
#else // !__WXDEBUG__
|
||||
#define wxStaticCast(obj, className) \
|
||||
wx_const_cast(className *, wx_static_cast(const className *, obj))
|
||||
const_cast<className *>(static_cast<const className *>(obj))
|
||||
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
@@ -626,8 +626,8 @@ public:
|
||||
#ifdef _MSC_VER
|
||||
return (wxClassInfo*) m_classInfo;
|
||||
#else
|
||||
wxDynamicClassInfo *nonconst = wx_const_cast(wxDynamicClassInfo *, m_classInfo);
|
||||
return wx_static_cast(wxClassInfo *, nonconst);
|
||||
wxDynamicClassInfo *nonconst = const_cast<wxDynamicClassInfo *>(m_classInfo);
|
||||
return static_cast<wxClassInfo *>(nonconst);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -91,7 +91,7 @@ public:
|
||||
// needed for old GCC
|
||||
wxBitmap(char** data)
|
||||
{
|
||||
*this = wxBitmap(wx_const_cast(const char* const*, data));
|
||||
*this = wxBitmap(const_cast<const char* const*>(data));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
);
|
||||
wxIcon(const char* const* ppData) { CreateIconFromXpm(ppData); }
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char** ppData) { CreateIconFromXpm(wx_const_cast(const char* const*, ppData)); }
|
||||
wxIcon(char** ppData) { CreateIconFromXpm(const_cast<const char* const*>(ppData)); }
|
||||
#endif
|
||||
wxIcon( const wxString& rName
|
||||
,wxBitmapType lFlags = wxICON_DEFAULT_TYPE
|
||||
|
@@ -137,7 +137,7 @@ extern WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList;
|
||||
|
||||
inline bool operator==(wxPenStyle s, wxDeprecatedGUIConstants t)
|
||||
{
|
||||
return wx_static_cast(int, s) == wx_static_cast(int, t);
|
||||
return static_cast<int>(s) == static_cast<int>(t);
|
||||
}
|
||||
|
||||
inline bool operator!=(wxPenStyle s, wxDeprecatedGUIConstants t)
|
||||
|
@@ -27,7 +27,7 @@ class WXDLLIMPEXP_BASE wxStackFrameBase
|
||||
private:
|
||||
// put this inline function here so that it is defined before use
|
||||
wxStackFrameBase *ConstCast() const
|
||||
{ return wx_const_cast(wxStackFrameBase *, this); }
|
||||
{ return const_cast<wxStackFrameBase *>(this); }
|
||||
|
||||
public:
|
||||
wxStackFrameBase(size_t level, void *address = NULL)
|
||||
|
@@ -987,7 +987,7 @@ public:
|
||||
iterator(wxString *str, underlying_iterator ptr)
|
||||
: m_cur(ptr), m_node(str, &m_cur) {}
|
||||
|
||||
wxString* str() const { return wx_const_cast(wxString*, m_node.m_str); }
|
||||
wxString* str() const { return const_cast<wxString*>(m_node.m_str); }
|
||||
|
||||
wxStringIteratorNode m_node;
|
||||
|
||||
@@ -3955,7 +3955,7 @@ inline wxCStrData::wxCStrData(const wxCStrData& data)
|
||||
inline wxCStrData::~wxCStrData()
|
||||
{
|
||||
if ( m_owned )
|
||||
delete wx_const_cast(wxString*, m_str); // cast to silence warnings
|
||||
delete const_cast<wxString*>(m_str); // cast to silence warnings
|
||||
}
|
||||
|
||||
// simple cases for AsChar() and AsWChar(), the complicated ones are
|
||||
@@ -4078,7 +4078,7 @@ void wxStringIteratorNode::DoSet(const wxString *str,
|
||||
if ( str )
|
||||
{
|
||||
m_next = str->m_iterators.ptr;
|
||||
wx_const_cast(wxString*, m_str)->m_iterators.ptr = this;
|
||||
const_cast<wxString*>(m_str)->m_iterators.ptr = this;
|
||||
if ( m_next )
|
||||
m_next->m_prev = this;
|
||||
}
|
||||
@@ -4095,7 +4095,7 @@ void wxStringIteratorNode::clear()
|
||||
if ( m_prev )
|
||||
m_prev->m_next = m_next;
|
||||
else if ( m_str ) // first in the list
|
||||
wx_const_cast(wxString*, m_str)->m_iterators.ptr = m_next;
|
||||
const_cast<wxString*>(m_str)->m_iterators.ptr = m_next;
|
||||
|
||||
m_next = m_prev = NULL;
|
||||
m_citer = NULL;
|
||||
|
@@ -156,7 +156,7 @@ public:
|
||||
|
||||
#if !wxUSE_UNICODE_WCHAR
|
||||
operator const char*() const
|
||||
{ return wx_const_cast(wxFormatString*, this)->AsChar(); }
|
||||
{ return const_cast<wxFormatString*>(this)->AsChar(); }
|
||||
private:
|
||||
// InputAsChar() returns the value converted passed to ctor, only converted
|
||||
// to char, while AsChar() takes the the string returned by InputAsChar()
|
||||
@@ -170,7 +170,7 @@ private:
|
||||
#if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY
|
||||
public:
|
||||
operator const wchar_t*() const
|
||||
{ return wx_const_cast(wxFormatString*, this)->AsWChar(); }
|
||||
{ return const_cast<wxFormatString*>(this)->AsWChar(); }
|
||||
private:
|
||||
const wchar_t* InputAsWChar();
|
||||
const wchar_t* AsWChar();
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
// wxInputConsumer pure virtual
|
||||
virtual wxWindow *GetInputWindow() const
|
||||
{ return wx_const_cast(wxStatusBar*, this); }
|
||||
{ return const_cast<wxStatusBar*>(this); }
|
||||
|
||||
protected:
|
||||
// recalculate the field widths
|
||||
|
@@ -153,7 +153,7 @@ public:
|
||||
|
||||
virtual wxSize GetMinSize() const;
|
||||
|
||||
virtual wxWindow *GetInputWindow() const { return wx_const_cast(wxTopLevelWindow*, this); }
|
||||
virtual wxWindow *GetInputWindow() const { return const_cast<wxTopLevelWindow*>(this); }
|
||||
|
||||
protected:
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
@@ -114,7 +114,7 @@ public:
|
||||
virtual bool Init_Socket(GSocket *socket)
|
||||
{
|
||||
socket->m_gui_dependent = malloc(sizeof(int)*2);
|
||||
int * const fds = wx_static_cast(int *, socket->m_gui_dependent);
|
||||
int * const fds = static_cast<int *>(socket->m_gui_dependent);
|
||||
|
||||
fds[0] = -1;
|
||||
fds[1] = -1;
|
||||
@@ -174,7 +174,7 @@ protected:
|
||||
// access the FDs we store
|
||||
int& FD(GSocket *socket, SocketDir d)
|
||||
{
|
||||
return wx_static_cast(int *, socket->m_gui_dependent)[d];
|
||||
return static_cast<int *>(socket->m_gui_dependent)[d];
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -73,7 +73,7 @@ public:
|
||||
// needed for old GCC
|
||||
wxBitmap(char** data)
|
||||
{
|
||||
*this = wxBitmap(wx_const_cast(const char* const*, data));
|
||||
*this = wxBitmap(const_cast<const char* const*>(data));
|
||||
}
|
||||
#endif
|
||||
wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
|
||||
|
@@ -198,31 +198,31 @@ private:
|
||||
#define wxCRT_Toupper_lA wxXLOCALE_IDENT(toupper_l)
|
||||
|
||||
inline int wxIsalnum_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isalnum_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isalnum_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsalpha_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isalpha_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isalpha_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIscntrl_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Iscntrl_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Iscntrl_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsdigit_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isdigit_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isdigit_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsgraph_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isgraph_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isgraph_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIslower_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Islower_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Islower_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsprint_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isprint_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isprint_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIspunct_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Ispunct_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Ispunct_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsspace_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isspace_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isspace_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsupper_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isupper_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isupper_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxIsxdigit_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Isxdigit_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Isxdigit_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxTolower_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Tolower_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Tolower_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
inline int wxToupper_l(char c, const wxXLocale& loc)
|
||||
{ return wxCRT_Toupper_lA(wx_static_cast(unsigned char, c), loc.Get()); }
|
||||
{ return wxCRT_Toupper_lA(static_cast<unsigned char>(c), loc.Get()); }
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define wxCRT_Isalnum_lW wxXLOCALE_IDENT(iswalnum_l)
|
||||
|
@@ -38,7 +38,7 @@ public:
|
||||
wxImage ReadData(const char* const* xpm_data);
|
||||
#ifdef __BORLANDC__
|
||||
// needed for Borland 5.5
|
||||
wxImage ReadData(char** xpm_data) { return ReadData(wx_const_cast(const char* const*, xpm_data)); }
|
||||
wxImage ReadData(char** xpm_data) { return ReadData(const_cast<const char* const*>(xpm_data)); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -439,8 +439,8 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect& rect) const
|
||||
NSRect imageRect = {{0,0}, [nsimage size]};
|
||||
imageRect.origin.x = imageRect.size.width * rect.x / GetWidth();
|
||||
imageRect.origin.y = imageRect.size.height * rect.y / GetHeight();
|
||||
imageRect.size.width *= wx_static_cast(CGFloat, rect.width) / GetWidth();
|
||||
imageRect.size.height *= wx_static_cast(CGFloat, rect.height) / GetHeight();
|
||||
imageRect.size.width *= static_cast<CGFloat>(rect.width) / GetWidth();
|
||||
imageRect.size.height *= static_cast<CGFloat>(rect.height) / GetHeight();
|
||||
|
||||
NSBitmapImageRep *newBitmapRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:imageRect];
|
||||
[nsimage unlockFocus];
|
||||
|
@@ -338,7 +338,7 @@ wxGDIRefData *wxFont::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxFontRefData(*wx_static_cast(const wxFontRefData *, data));
|
||||
return new wxFontRefData(*static_cast<const wxFontRefData *>(data));
|
||||
}
|
||||
|
||||
void wxFont::SetEncoding(wxFontEncoding)
|
||||
|
@@ -107,7 +107,7 @@ wxGDIRefData *wxIcon::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxIcon::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxIconRefData(*wx_static_cast(const wxIconRefData *, data));
|
||||
return new wxIconRefData(*static_cast<const wxIconRefData *>(data));
|
||||
}
|
||||
|
||||
bool wxIcon::CreateFromXpm(const char* const* xpm)
|
||||
|
@@ -131,7 +131,7 @@ wxAppConsoleBase::wxAppConsoleBase()
|
||||
m_traits = NULL;
|
||||
m_mainLoop = NULL;
|
||||
|
||||
ms_appInstance = wx_static_cast(wxAppConsole *, this);
|
||||
ms_appInstance = static_cast<wxAppConsole *>(this);
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
SetTraceMasks();
|
||||
|
@@ -18,7 +18,7 @@ wxBase64Encode(char *dst, size_t dstLen, const void *src_, size_t srcLen)
|
||||
{
|
||||
wxCHECK_MSG( src_, wxCONV_FAILED, _T("NULL input buffer") );
|
||||
|
||||
const unsigned char *src = wx_static_cast(const unsigned char *, src_);
|
||||
const unsigned char *src = static_cast<const unsigned char *>(src_);
|
||||
|
||||
static const char b64[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
@@ -71,7 +71,7 @@ wxBase64Decode(void *dst_, size_t dstLen,
|
||||
{
|
||||
wxCHECK_MSG( src, wxCONV_FAILED, _T("NULL input buffer") );
|
||||
|
||||
unsigned char *dst = wx_static_cast(unsigned char *, dst_);
|
||||
unsigned char *dst = static_cast<unsigned char *>(dst_);
|
||||
|
||||
size_t decLen = 0;
|
||||
|
||||
@@ -118,7 +118,7 @@ wxBase64Decode(void *dst_, size_t dstLen,
|
||||
const char *p;
|
||||
for ( p = src; srcLen; p++, srcLen-- )
|
||||
{
|
||||
const unsigned char c = decode[wx_static_cast(unsigned char, *p)];
|
||||
const unsigned char c = decode[static_cast<unsigned char>(*p)];
|
||||
switch ( c )
|
||||
{
|
||||
case WSP:
|
||||
|
@@ -110,7 +110,7 @@ wxString wxColourBase::GetAsString(long flags) const
|
||||
if ( (flags & wxC2S_NAME) && isOpaque )
|
||||
{
|
||||
colName = wxTheColourDatabase->FindName(
|
||||
wx_static_cast(const wxColour &, *this)).MakeLower();
|
||||
static_cast<const wxColour &>(*this)).MakeLower();
|
||||
}
|
||||
|
||||
if ( colName.empty() )
|
||||
|
@@ -533,7 +533,7 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
!m_winLastFocused->HasFlag(wxRB_SINGLE) )
|
||||
{
|
||||
wxRadioButton * const
|
||||
lastBtn = wx_static_cast(wxRadioButton *, m_winLastFocused);
|
||||
lastBtn = static_cast<wxRadioButton *>(m_winLastFocused);
|
||||
|
||||
// cursor keys don't navigate out of a radio button group so
|
||||
// find the correct radio button to focus
|
||||
|
@@ -194,7 +194,7 @@ wxConvAuto::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
// during this initial call but also during the first call with non-NULL
|
||||
// dst as typically we're first called with NULL dst to calculate the
|
||||
// needed buffer size
|
||||
wxConvAuto *self = wx_const_cast(wxConvAuto *, this);
|
||||
wxConvAuto *self = const_cast<wxConvAuto *>(this);
|
||||
if ( !m_conv )
|
||||
{
|
||||
self->InitFromInput(&src, &srcLen);
|
||||
@@ -238,7 +238,7 @@ wxConvAuto::FromWChar(char *dst, size_t dstLen,
|
||||
if ( !m_conv )
|
||||
{
|
||||
// default to UTF-8 for the multibyte output
|
||||
wx_const_cast(wxConvAuto *, this)->InitWithUTF8();
|
||||
const_cast<wxConvAuto *>(this)->InitWithUTF8();
|
||||
}
|
||||
|
||||
return m_conv->FromWChar(dst, dstLen, src, srcLen);
|
||||
|
@@ -168,7 +168,7 @@ void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data)
|
||||
if ( HasClientObjectData() )
|
||||
{
|
||||
wxClientData * clientDataOld
|
||||
= wx_static_cast(wxClientData *, DoGetItemClientData(n));
|
||||
= static_cast<wxClientData *>(DoGetItemClientData(n));
|
||||
if ( clientDataOld )
|
||||
delete clientDataOld;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ wxClientData *wxItemContainer::GetClientObject(unsigned int n) const
|
||||
wxCHECK_MSG( HasClientObjectData(), NULL,
|
||||
wxT("this window doesn't have object client data") );
|
||||
|
||||
return wx_static_cast(wxClientData *, DoGetItemClientData(n));
|
||||
return static_cast<wxClientData *>(DoGetItemClientData(n));
|
||||
}
|
||||
|
||||
void wxItemContainer::SetClientData(unsigned int n, void *data)
|
||||
@@ -224,7 +224,7 @@ void wxItemContainer::AssignNewItemClientData(unsigned int pos,
|
||||
SetClientObject
|
||||
(
|
||||
pos,
|
||||
(wx_reinterpret_cast(wxClientData **, clientData))[n]
|
||||
(reinterpret_cast<wxClientData **>(clientData))[n]
|
||||
);
|
||||
break;
|
||||
|
||||
|
@@ -671,7 +671,7 @@ wxDataViewRendererBase::~wxDataViewRendererBase()
|
||||
|
||||
const wxDataViewCtrl* wxDataViewRendererBase::GetView() const
|
||||
{
|
||||
return wx_const_cast(wxDataViewRendererBase*, this)->GetOwner()->GetOwner();
|
||||
return const_cast<wxDataViewRendererBase*>(this)->GetOwner()->GetOwner();
|
||||
}
|
||||
|
||||
class wxKillRef: public wxWindowRef
|
||||
|
@@ -4602,7 +4602,7 @@ WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd)
|
||||
wxDateTime& wxDateTime::SetFromMSWSysTime(const SYSTEMTIME& st)
|
||||
{
|
||||
return Set(st.wDay,
|
||||
wx_static_cast(wxDateTime::Month, wxDateTime::Jan + st.wMonth - 1),
|
||||
static_cast<wxDateTime::Month>(wxDateTime::Jan + st.wMonth - 1),
|
||||
st.wYear,
|
||||
0, 0, 0);
|
||||
}
|
||||
|
@@ -320,7 +320,7 @@ bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
|
||||
bool wxTextDataObject::SetData(const wxDataFormat& format,
|
||||
size_t len, const void *buf_)
|
||||
{
|
||||
const char * const buf = wx_static_cast(const char *, buf_);
|
||||
const char * const buf = static_cast<const char *>(buf_);
|
||||
|
||||
if ( buf == NULL )
|
||||
return false;
|
||||
|
@@ -1172,7 +1172,7 @@ void wxEvtHandler::ProcessPendingEvents()
|
||||
"should have pending events if called" );
|
||||
|
||||
wxList::compatibility_iterator node = m_pendingEvents->GetFirst();
|
||||
wxEventPtr event(wx_static_cast(wxEvent *, node->GetData()));
|
||||
wxEventPtr event(static_cast<wxEvent *>(node->GetData()));
|
||||
|
||||
// it's important we remove event from list before processing it, else a
|
||||
// nested event loop, for example from a modal dialog, might process the
|
||||
|
@@ -827,7 +827,7 @@ bool wxFileConfig::HasGroup(const wxString& strName) const
|
||||
|
||||
const wxString pathOld = GetPath();
|
||||
|
||||
wxFileConfig *self = wx_const_cast(wxFileConfig *, this);
|
||||
wxFileConfig *self = const_cast<wxFileConfig *>(this);
|
||||
const bool
|
||||
rc = self->DoSetPath(strName, false /* don't create missing components */);
|
||||
|
||||
@@ -850,7 +850,7 @@ bool wxFileConfig::HasEntry(const wxString& entry) const
|
||||
// change to the path of the entry if necessary and remember the old path
|
||||
// to restore it later
|
||||
wxString pathOld;
|
||||
wxFileConfig * const self = wx_const_cast(wxFileConfig *, this);
|
||||
wxFileConfig * const self = const_cast<wxFileConfig *>(this);
|
||||
if ( !path.empty() )
|
||||
{
|
||||
pathOld = GetPath();
|
||||
@@ -1678,9 +1678,9 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup)
|
||||
|
||||
wxLogTrace( FILECONF_TRACE_MASK,
|
||||
_T(" (m_pLine) = prev: %p, this %p, next %p"),
|
||||
m_pLine ? wx_static_cast(void*, m_pLine->Prev()) : 0,
|
||||
wx_static_cast(void*, m_pLine),
|
||||
m_pLine ? wx_static_cast(void*, m_pLine->Next()) : 0 );
|
||||
m_pLine ? static_cast<void*>(m_pLine->Prev()) : 0,
|
||||
static_cast<void*>(m_pLine),
|
||||
m_pLine ? static_cast<void*>(m_pLine->Next()) : 0 );
|
||||
wxLogTrace( FILECONF_TRACE_MASK,
|
||||
_T(" text: '%s'"),
|
||||
m_pLine ? (const wxChar*)m_pLine->Text().c_str()
|
||||
|
@@ -528,7 +528,7 @@ void wxStockGDI::DeleteAll()
|
||||
|
||||
const wxBrush* wxStockGDI::GetBrush(Item item)
|
||||
{
|
||||
wxBrush* brush = wx_static_cast(wxBrush*, ms_stockObject[item]);
|
||||
wxBrush* brush = static_cast<wxBrush*>(ms_stockObject[item]);
|
||||
if (brush == NULL)
|
||||
{
|
||||
switch (item)
|
||||
@@ -573,7 +573,7 @@ const wxBrush* wxStockGDI::GetBrush(Item item)
|
||||
|
||||
const wxColour* wxStockGDI::GetColour(Item item)
|
||||
{
|
||||
wxColour* colour = wx_static_cast(wxColour*, ms_stockObject[item]);
|
||||
wxColour* colour = static_cast<wxColour*>(ms_stockObject[item]);
|
||||
if (colour == NULL)
|
||||
{
|
||||
switch (item)
|
||||
@@ -609,7 +609,7 @@ const wxColour* wxStockGDI::GetColour(Item item)
|
||||
|
||||
const wxCursor* wxStockGDI::GetCursor(Item item)
|
||||
{
|
||||
wxCursor* cursor = wx_static_cast(wxCursor*, ms_stockObject[item]);
|
||||
wxCursor* cursor = static_cast<wxCursor*>(ms_stockObject[item]);
|
||||
if (cursor == NULL)
|
||||
{
|
||||
switch (item)
|
||||
@@ -633,7 +633,7 @@ const wxCursor* wxStockGDI::GetCursor(Item item)
|
||||
|
||||
const wxFont* wxStockGDI::GetFont(Item item)
|
||||
{
|
||||
wxFont* font = wx_static_cast(wxFont*, ms_stockObject[item]);
|
||||
wxFont* font = static_cast<wxFont*>(ms_stockObject[item]);
|
||||
if (font == NULL)
|
||||
{
|
||||
switch (item)
|
||||
@@ -660,7 +660,7 @@ const wxFont* wxStockGDI::GetFont(Item item)
|
||||
|
||||
const wxPen* wxStockGDI::GetPen(Item item)
|
||||
{
|
||||
wxPen* pen = wx_static_cast(wxPen*, ms_stockObject[item]);
|
||||
wxPen* pen = static_cast<wxPen*>(ms_stockObject[item]);
|
||||
if (pen == NULL)
|
||||
{
|
||||
switch (item)
|
||||
@@ -731,7 +731,7 @@ wxGDIObjListBase::~wxGDIObjListBase()
|
||||
{
|
||||
for (wxList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext())
|
||||
{
|
||||
delete wx_static_cast(wxObject*, node->GetData());
|
||||
delete static_cast<wxObject*>(node->GetData());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const
|
||||
// that SetCurrent() can only be called for a shown window, so check for it
|
||||
wxASSERT_MSG( IsShownOnScreen(), _T("can't make hidden GL canvas current") );
|
||||
|
||||
return context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this));
|
||||
return context.SetCurrent(*static_cast<const wxGLCanvas *>(this));
|
||||
}
|
||||
|
||||
bool wxGLCanvasBase::SetColour(const wxString& colour)
|
||||
|
@@ -73,7 +73,7 @@ wxGDIRefData *wxIconBundle::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxIconBundle::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxIconBundleRefData(*wx_static_cast(const wxIconBundleRefData *, data));
|
||||
return new wxIconBundleRefData(*static_cast<const wxIconBundleRefData *>(data));
|
||||
}
|
||||
|
||||
void wxIconBundle::DeleteIcons()
|
||||
|
@@ -123,7 +123,7 @@ wxImage wxNullImage;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define M_IMGDATA wx_static_cast(wxImageRefData*, m_refData)
|
||||
#define M_IMGDATA static_cast<wxImageRefData*>(m_refData)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxImage, wxObject)
|
||||
|
||||
@@ -252,7 +252,7 @@ wxObjectRefData* wxImage::CreateRefData() const
|
||||
|
||||
wxObjectRefData* wxImage::CloneRefData(const wxObjectRefData* that) const
|
||||
{
|
||||
const wxImageRefData* refData = wx_static_cast(const wxImageRefData*, that);
|
||||
const wxImageRefData* refData = static_cast<const wxImageRefData*>(that);
|
||||
wxCHECK_MSG(refData->m_ok, NULL, wxT("invalid image") );
|
||||
|
||||
wxImageRefData* refData_new = new wxImageRefData;
|
||||
@@ -1390,7 +1390,7 @@ wxImage wxImage::ConvertToGreyscale( double lr, double lg, double lb ) const
|
||||
{
|
||||
// calculate the luma
|
||||
double luma = (src[0] * lr + src[1] * lg + src[2] * lb) + 0.5;
|
||||
dest[0] = dest[1] = dest[2] = wx_static_cast(unsigned char, luma);
|
||||
dest[0] = dest[1] = dest[2] = static_cast<unsigned char>(luma);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2288,7 +2288,7 @@ bool wxImage::LoadFile( wxInputStream& stream, const wxString& mimetype, int ind
|
||||
|
||||
bool wxImage::DoSave(wxImageHandler& handler, wxOutputStream& stream) const
|
||||
{
|
||||
wxImage * const self = wx_const_cast(wxImage *, this);
|
||||
wxImage * const self = const_cast<wxImage *>(this);
|
||||
if ( !handler.SaveFile(self, stream) )
|
||||
return false;
|
||||
|
||||
|
@@ -933,7 +933,7 @@ private:
|
||||
// facilitate doing pointer arithmetic with it
|
||||
char *StringData() const
|
||||
{
|
||||
return wx_static_cast(char *, m_data.GetData());
|
||||
return static_cast<char *>(m_data.GetData());
|
||||
}
|
||||
|
||||
const char *StringAtOfs(wxMsgTableEntry *pTable, size_t32 n) const
|
||||
|
@@ -80,7 +80,7 @@ wxString wxConnectionBase::GetTextFromData(const void* data,
|
||||
if ( size )
|
||||
size--;
|
||||
|
||||
s = wxString(wx_static_cast(const char *, data), size);
|
||||
s = wxString(static_cast<const char *>(data), size);
|
||||
break;
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
@@ -94,14 +94,14 @@ wxString wxConnectionBase::GetTextFromData(const void* data,
|
||||
size--;
|
||||
}
|
||||
|
||||
s = wxString(wx_static_cast(const wchar_t *, data), size);
|
||||
s = wxString(static_cast<const wchar_t *>(data), size);
|
||||
break;
|
||||
|
||||
case wxIPC_UTF8TEXT:
|
||||
if ( size )
|
||||
size--;
|
||||
|
||||
s = wxString::FromUTF8(wx_static_cast(const char *, data), size);
|
||||
s = wxString::FromUTF8(static_cast<const char *>(data), size);
|
||||
break;
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
|
@@ -594,7 +594,7 @@ bool wxDebugContext::Dump(void)
|
||||
{
|
||||
appNameStr = wxTheApp->GetAppName();
|
||||
appName = appNameStr.c_str();
|
||||
OutputDumpLine(wxT("----- Memory dump of %s at %s -----"), appName, wx_static_cast(const wxChar *, wxNow().c_str()));
|
||||
OutputDumpLine(wxT("----- Memory dump of %s at %s -----"), appName, static_cast<const wxChar *>(wxNow().c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -650,7 +650,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
|
||||
{
|
||||
appNameStr = wxTheApp->GetAppName();
|
||||
appName = appNameStr.c_str();
|
||||
OutputDumpLine(wxT("----- Memory statistics of %s at %s -----"), appName, wx_static_cast(const wxChar *, wxNow().c_str()));
|
||||
OutputDumpLine(wxT("----- Memory statistics of %s at %s -----"), appName, static_cast<const wxChar *>(wxNow().c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -277,7 +277,7 @@ wxString wxRadioBoxBase::DoGetHelpTextAtPoint(const wxWindow *derived,
|
||||
|
||||
if ( item != wxNOT_FOUND )
|
||||
{
|
||||
wxString text = GetItemHelpText(wx_static_cast(unsigned int, item));
|
||||
wxString text = GetItemHelpText(static_cast<unsigned int>(item));
|
||||
if( !text.empty() )
|
||||
return text;
|
||||
}
|
||||
|
@@ -378,7 +378,7 @@ static int ReSearch(const regex_t *preg,
|
||||
re_registers *matches,
|
||||
int eflags)
|
||||
{
|
||||
regex_t *pattern = wx_const_cast(regex_t*, preg);
|
||||
regex_t *pattern = const_cast<regex_t*>(preg);
|
||||
|
||||
pattern->not_bol = (eflags & REG_NOTBOL) != 0;
|
||||
pattern->not_eol = (eflags & REG_NOTEOL) != 0;
|
||||
|
@@ -65,7 +65,7 @@ wxBitmap wxRegionBase::ConvertToBitmap() const
|
||||
dc.SelectObject(bmp);
|
||||
dc.SetBackground(*wxBLACK_BRUSH);
|
||||
dc.Clear();
|
||||
dc.SetDeviceClippingRegion(*wx_static_cast(const wxRegion *, this));
|
||||
dc.SetDeviceClippingRegion(*static_cast<const wxRegion *>(this));
|
||||
dc.SetBackground(*wxWHITE_BRUSH);
|
||||
dc.Clear();
|
||||
dc.SelectObject(wxNullBitmap);
|
||||
|
@@ -86,7 +86,7 @@ wxFileOffset wxStringInputStream::OnSysSeek(wxFileOffset ofs, wxSeekMode mode)
|
||||
return wxInvalidOffset;
|
||||
}
|
||||
|
||||
if ( ofs < 0 || ofs > wx_static_cast(wxFileOffset, m_len) )
|
||||
if ( ofs < 0 || ofs > static_cast<wxFileOffset>(m_len) )
|
||||
return wxInvalidOffset;
|
||||
|
||||
// FIXME: this can't be right
|
||||
@@ -97,7 +97,7 @@ wxFileOffset wxStringInputStream::OnSysSeek(wxFileOffset ofs, wxSeekMode mode)
|
||||
|
||||
wxFileOffset wxStringInputStream::OnSysTell() const
|
||||
{
|
||||
return wx_static_cast(wxFileOffset, m_pos);
|
||||
return static_cast<wxFileOffset>(m_pos);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -135,7 +135,7 @@ size_t wxStringInputStream::OnSysRead(void *buffer, size_t size)
|
||||
|
||||
wxFileOffset wxStringOutputStream::OnSysTell() const
|
||||
{
|
||||
return wx_static_cast(wxFileOffset, m_pos);
|
||||
return static_cast<wxFileOffset>(m_pos);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -144,7 +144,7 @@ wxFileOffset wxStringOutputStream::OnSysTell() const
|
||||
|
||||
size_t wxStringOutputStream::OnSysWrite(const void *buffer, size_t size)
|
||||
{
|
||||
const char *p = wx_static_cast(const char *, buffer);
|
||||
const char *p = static_cast<const char *>(buffer);
|
||||
|
||||
#if wxUSE_UNICODE_WCHAR
|
||||
// the part of the string we have here may be incomplete, i.e. it can stop
|
||||
|
@@ -323,7 +323,7 @@ wxString wxStaticTextBase::Ellipsize(const wxString& label) const
|
||||
return label;
|
||||
}
|
||||
|
||||
wxClientDC dc(wx_const_cast(wxStaticTextBase*, this));
|
||||
wxClientDC dc(const_cast<wxStaticTextBase*>(this));
|
||||
dc.SetFont(GetFont());
|
||||
|
||||
wxArrayInt charOffsets;
|
||||
|
@@ -142,7 +142,7 @@ static wxUint32 wxDecodeSurrogate(const wxDecodeSurrogate_t **pSrc)
|
||||
{
|
||||
wxUint32 out;
|
||||
const size_t
|
||||
n = decode_utf16(wx_reinterpret_cast(const wxUint16 *, *pSrc), out);
|
||||
n = decode_utf16(reinterpret_cast<const wxUint16 *>(*pSrc), out);
|
||||
if ( n == wxCONV_FAILED )
|
||||
*pSrc = NULL;
|
||||
else
|
||||
@@ -584,7 +584,7 @@ size_t wxMBConvUTF7::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
}
|
||||
else // when working with partial strings we do use the shift state
|
||||
{
|
||||
statePtr = wx_const_cast(DecoderState *, &m_stateDecoder);
|
||||
statePtr = const_cast<DecoderState *>(&m_stateDecoder);
|
||||
|
||||
// also save the old state to be able to rollback to it on error
|
||||
stateOrig = m_stateDecoder;
|
||||
@@ -771,7 +771,7 @@ size_t wxMBConvUTF7::FromWChar(char *dst, size_t dstLen,
|
||||
else // do use the mode we left the output in previously
|
||||
{
|
||||
stateOrig = m_stateEncoder;
|
||||
statePtr = wx_const_cast(EncoderState *, &m_stateEncoder);
|
||||
statePtr = const_cast<EncoderState *>(&m_stateEncoder);
|
||||
}
|
||||
|
||||
EncoderState& state = *statePtr;
|
||||
@@ -1407,7 +1407,7 @@ size_t wxMBConvUTF16Base::GetLength(const char *src, size_t srcLen)
|
||||
if ( srcLen == wxNO_LEN )
|
||||
{
|
||||
// count the number of bytes in input, including the trailing NULs
|
||||
const wxUint16 *inBuff = wx_reinterpret_cast(const wxUint16 *, src);
|
||||
const wxUint16 *inBuff = reinterpret_cast<const wxUint16 *>(src);
|
||||
for ( srcLen = 1; *inBuff++; srcLen++ )
|
||||
;
|
||||
|
||||
@@ -1491,7 +1491,7 @@ wxMBConvUTF16swap::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
if ( dstLen < srcLen )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
const wxUint16 *inBuff = wx_reinterpret_cast(const wxUint16 *, src);
|
||||
const wxUint16 *inBuff = reinterpret_cast<const wxUint16 *>(src);
|
||||
for ( size_t n = 0; n < srcLen; n++, inBuff++ )
|
||||
{
|
||||
*dst++ = wxUINT16_SWAP_ALWAYS(*inBuff);
|
||||
@@ -1515,7 +1515,7 @@ wxMBConvUTF16swap::FromWChar(char *dst, size_t dstLen,
|
||||
if ( dstLen < srcLen )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
wxUint16 *outBuff = wx_reinterpret_cast(wxUint16 *, dst);
|
||||
wxUint16 *outBuff = reinterpret_cast<wxUint16 *>(dst);
|
||||
for ( size_t n = 0; n < srcLen; n += BYTES_PER_CHAR, src++ )
|
||||
{
|
||||
*outBuff++ = wxUINT16_SWAP_ALWAYS(*src);
|
||||
@@ -1549,7 +1549,7 @@ wxMBConvUTF16straight::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
}
|
||||
|
||||
size_t outLen = 0;
|
||||
const wxUint16 *inBuff = wx_reinterpret_cast(const wxUint16 *, src);
|
||||
const wxUint16 *inBuff = reinterpret_cast<const wxUint16 *>(src);
|
||||
for ( const wxUint16 * const inEnd = inBuff + inLen; inBuff < inEnd; )
|
||||
{
|
||||
const wxUint32 ch = wxDecodeSurrogate(&inBuff);
|
||||
@@ -1574,7 +1574,7 @@ wxMBConvUTF16straight::FromWChar(char *dst, size_t dstLen,
|
||||
srcLen = wxWcslen(src) + 1;
|
||||
|
||||
size_t outLen = 0;
|
||||
wxUint16 *outBuff = wx_reinterpret_cast(wxUint16 *, dst);
|
||||
wxUint16 *outBuff = reinterpret_cast<wxUint16 *>(dst);
|
||||
for ( size_t n = 0; n < srcLen; n++ )
|
||||
{
|
||||
wxUint16 cc[2];
|
||||
@@ -1622,7 +1622,7 @@ wxMBConvUTF16swap::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
}
|
||||
|
||||
size_t outLen = 0;
|
||||
const wxUint16 *inBuff = wx_reinterpret_cast(const wxUint16 *, src);
|
||||
const wxUint16 *inBuff = reinterpret_cast<const wxUint16 *>(src);
|
||||
for ( const wxUint16 * const inEnd = inBuff + inLen; inBuff < inEnd; )
|
||||
{
|
||||
wxUint32 ch;
|
||||
@@ -1657,7 +1657,7 @@ wxMBConvUTF16swap::FromWChar(char *dst, size_t dstLen,
|
||||
srcLen = wxWcslen(src) + 1;
|
||||
|
||||
size_t outLen = 0;
|
||||
wxUint16 *outBuff = wx_reinterpret_cast(wxUint16 *, dst);
|
||||
wxUint16 *outBuff = reinterpret_cast<wxUint16 *>(dst);
|
||||
for ( const wchar_t *srcEnd = src + srcLen; src < srcEnd; src++ )
|
||||
{
|
||||
wxUint16 cc[2];
|
||||
@@ -1708,7 +1708,7 @@ size_t wxMBConvUTF32Base::GetLength(const char *src, size_t srcLen)
|
||||
if ( srcLen == wxNO_LEN )
|
||||
{
|
||||
// count the number of bytes in input, including the trailing NULs
|
||||
const wxUint32 *inBuff = wx_reinterpret_cast(const wxUint32 *, src);
|
||||
const wxUint32 *inBuff = reinterpret_cast<const wxUint32 *>(src);
|
||||
for ( srcLen = 1; *inBuff++; srcLen++ )
|
||||
;
|
||||
|
||||
@@ -1739,7 +1739,7 @@ wxMBConvUTF32straight::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
if ( srcLen == wxNO_LEN )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
const wxUint32 *inBuff = wx_reinterpret_cast(const wxUint32 *, src);
|
||||
const wxUint32 *inBuff = reinterpret_cast<const wxUint32 *>(src);
|
||||
const size_t inLen = srcLen / BYTES_PER_CHAR;
|
||||
size_t outLen = 0;
|
||||
for ( size_t n = 0; n < inLen; n++ )
|
||||
@@ -1786,7 +1786,7 @@ wxMBConvUTF32straight::FromWChar(char *dst, size_t dstLen,
|
||||
return srcLen * BYTES_PER_CHAR;
|
||||
}
|
||||
|
||||
wxUint32 *outBuff = wx_reinterpret_cast(wxUint32 *, dst);
|
||||
wxUint32 *outBuff = reinterpret_cast<wxUint32 *>(dst);
|
||||
size_t outLen = 0;
|
||||
for ( const wchar_t * const srcEnd = src + srcLen; src < srcEnd; )
|
||||
{
|
||||
@@ -1817,7 +1817,7 @@ wxMBConvUTF32swap::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
if ( srcLen == wxNO_LEN )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
const wxUint32 *inBuff = wx_reinterpret_cast(const wxUint32 *, src);
|
||||
const wxUint32 *inBuff = reinterpret_cast<const wxUint32 *>(src);
|
||||
const size_t inLen = srcLen / BYTES_PER_CHAR;
|
||||
size_t outLen = 0;
|
||||
for ( size_t n = 0; n < inLen; n++, inBuff++ )
|
||||
@@ -1864,7 +1864,7 @@ wxMBConvUTF32swap::FromWChar(char *dst, size_t dstLen,
|
||||
return srcLen*BYTES_PER_CHAR;
|
||||
}
|
||||
|
||||
wxUint32 *outBuff = wx_reinterpret_cast(wxUint32 *, dst);
|
||||
wxUint32 *outBuff = reinterpret_cast<wxUint32 *>(dst);
|
||||
size_t outLen = 0;
|
||||
for ( const wchar_t * const srcEnd = src + srcLen; src < srcEnd; )
|
||||
{
|
||||
@@ -1949,7 +1949,7 @@ wxMBConvUTF32swap::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
if ( dstLen < srcLen )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
const wxUint32 *inBuff = wx_reinterpret_cast(const wxUint32 *, src);
|
||||
const wxUint32 *inBuff = reinterpret_cast<const wxUint32 *>(src);
|
||||
for ( size_t n = 0; n < srcLen; n++, inBuff++ )
|
||||
{
|
||||
*dst++ = wxUINT32_SWAP_ALWAYS(*inBuff);
|
||||
@@ -1973,7 +1973,7 @@ wxMBConvUTF32swap::FromWChar(char *dst, size_t dstLen,
|
||||
if ( dstLen < srcLen )
|
||||
return wxCONV_FAILED;
|
||||
|
||||
wxUint32 *outBuff = wx_reinterpret_cast(wxUint32 *, dst);
|
||||
wxUint32 *outBuff = reinterpret_cast<wxUint32 *>(dst);
|
||||
for ( size_t n = 0; n < srcLen; n += BYTES_PER_CHAR, src++ )
|
||||
{
|
||||
*outBuff++ = wxUINT32_SWAP_ALWAYS(*src);
|
||||
|
@@ -72,14 +72,14 @@ wxString wxArgNormalizedString::GetString() const
|
||||
return wxEmptyString;
|
||||
|
||||
#if wxUSE_UTF8_LOCALE_ONLY
|
||||
return wxString(wx_reinterpret_cast(const char*, m_ptr));
|
||||
return wxString(reinterpret_cast<const char*>(m_ptr));
|
||||
#else
|
||||
#if wxUSE_UNICODE_UTF8
|
||||
if ( wxLocaleIsUtf8 )
|
||||
return wxString(wx_reinterpret_cast(const char*, m_ptr));
|
||||
return wxString(reinterpret_cast<const char*>(m_ptr));
|
||||
else
|
||||
#endif
|
||||
return wxString(wx_reinterpret_cast(const wxChar*, m_ptr));
|
||||
return wxString(reinterpret_cast<const wxChar*>(m_ptr));
|
||||
#endif // !wxUSE_UTF8_LOCALE_ONLY
|
||||
}
|
||||
|
||||
|
@@ -123,7 +123,7 @@ bool wxTopLevelWindowBase::Destroy()
|
||||
i != end;
|
||||
++i )
|
||||
{
|
||||
wxTopLevelWindow * const win = wx_static_cast(wxTopLevelWindow *, *i);
|
||||
wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
|
||||
if ( win != this && win->IsShown() )
|
||||
{
|
||||
// there remains at least one other visible TLW, we can hide this
|
||||
@@ -150,7 +150,7 @@ bool wxTopLevelWindowBase::IsLastBeforeExit() const
|
||||
// then decide whether we should exit at all
|
||||
for ( i = wxTopLevelWindows.begin(); i != end; ++i )
|
||||
{
|
||||
wxTopLevelWindow * const win = wx_static_cast(wxTopLevelWindow *, *i);
|
||||
wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
|
||||
if ( win->ShouldPreventAppExit() )
|
||||
{
|
||||
// there remains at least one important TLW, don't exit
|
||||
@@ -162,7 +162,7 @@ bool wxTopLevelWindowBase::IsLastBeforeExit() const
|
||||
for ( i = wxTopLevelWindows.begin(); i != end; ++i )
|
||||
{
|
||||
// don't close twice the windows which are already marked for deletion
|
||||
wxTopLevelWindow * const win = wx_static_cast(wxTopLevelWindow *, *i);
|
||||
wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
|
||||
if ( !wxPendingDelete.Member(win) && !win->Close() )
|
||||
{
|
||||
// one of the windows refused to close, don't exit
|
||||
|
@@ -132,7 +132,7 @@ wxString wxURI::Unescape(const wxString& uri)
|
||||
|
||||
wxASSERT_MSG( n >= 0 && n <= 0xff, "unexpected character value" );
|
||||
|
||||
c = wx_static_cast(char, n);
|
||||
c = static_cast<char>(n);
|
||||
}
|
||||
|
||||
*p = c;
|
||||
|
@@ -1034,7 +1034,7 @@ bool wxVariantDataWxObjectPtr::Write(wxSTD ostream& str) const
|
||||
|
||||
bool wxVariantDataWxObjectPtr::Write(wxString& str) const
|
||||
{
|
||||
str.Printf(wxT("%s(%p)"), GetType().c_str(), wx_static_cast(void*, m_value));
|
||||
str.Printf(wxT("%s(%p)"), GetType().c_str(), static_cast<void*>(m_value));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -2617,7 +2617,7 @@ bool wxWindowBase::ms_winCaptureChanging = false;
|
||||
|
||||
void wxWindowBase::CaptureMouse()
|
||||
{
|
||||
wxLogTrace(_T("mousecapture"), _T("CaptureMouse(%p)"), wx_static_cast(void*, this));
|
||||
wxLogTrace(_T("mousecapture"), _T("CaptureMouse(%p)"), static_cast<void*>(this));
|
||||
|
||||
wxASSERT_MSG( !ms_winCaptureChanging, _T("recursive CaptureMouse call?") );
|
||||
|
||||
@@ -2644,7 +2644,7 @@ void wxWindowBase::CaptureMouse()
|
||||
|
||||
void wxWindowBase::ReleaseMouse()
|
||||
{
|
||||
wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(%p)"), wx_static_cast(void*, this));
|
||||
wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(%p)"), static_cast<void*>(this));
|
||||
|
||||
wxASSERT_MSG( !ms_winCaptureChanging, _T("recursive ReleaseMouse call?") );
|
||||
|
||||
@@ -2673,7 +2673,7 @@ void wxWindowBase::ReleaseMouse()
|
||||
|
||||
wxLogTrace(_T("mousecapture"),
|
||||
(const wxChar *) _T("After ReleaseMouse() mouse is captured by %p"),
|
||||
wx_static_cast(void*, GetCapture()));
|
||||
static_cast<void*>(GetCapture()));
|
||||
}
|
||||
|
||||
static void DoNotifyWindowAboutCaptureLost(wxWindow *win)
|
||||
|
@@ -112,7 +112,7 @@ void wxWrapSizer::ClearRows()
|
||||
row->GetChildren().clear();
|
||||
|
||||
wxPropChanger * const
|
||||
propChanger = wx_static_cast(wxPropChanger *, item->GetUserData());
|
||||
propChanger = static_cast<wxPropChanger *>(item->GetUserData());
|
||||
if ( propChanger )
|
||||
{
|
||||
// this deletes propChanger and so restores the old proportion
|
||||
|
@@ -304,7 +304,7 @@ static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr)
|
||||
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
|
||||
_T("incomplete vswscanf implementation doesn't allow %c") );
|
||||
|
||||
return vsscanf(wx_static_cast(const char*, wxConvLibc.cWX2MB(ws)),
|
||||
return vsscanf(static_cast<const char*>(wxConvLibc.cWX2MB(ws)),
|
||||
wxConvLibc.cWX2MB(format), argptr);
|
||||
}
|
||||
#endif
|
||||
@@ -1311,15 +1311,15 @@ int wxVsscanf(const char *str, const char *format, va_list ap)
|
||||
int wxVsscanf(const wchar_t *str, const wchar_t *format, va_list ap)
|
||||
{ return wxCRT_VsscanfW(str, format, ap); }
|
||||
int wxVsscanf(const wxCharBuffer& str, const char *format, va_list ap)
|
||||
{ return wxCRT_VsscanfA(wx_static_cast(const char*, str), format, ap); }
|
||||
{ return wxCRT_VsscanfA(static_cast<const char*>(str), format, ap); }
|
||||
int wxVsscanf(const wxWCharBuffer& str, const wchar_t *format, va_list ap)
|
||||
{ return wxCRT_VsscanfW(str, format, ap); }
|
||||
int wxVsscanf(const wxString& str, const char *format, va_list ap)
|
||||
{ return wxCRT_VsscanfA(wx_static_cast(const char*, str.mb_str()), format, ap); }
|
||||
{ return wxCRT_VsscanfA(static_cast<const char*>(str.mb_str()), format, ap); }
|
||||
int wxVsscanf(const wxString& str, const wchar_t *format, va_list ap)
|
||||
{ return wxCRT_VsscanfW(str.wc_str(), format, ap); }
|
||||
int wxVsscanf(const wxCStrData& str, const char *format, va_list ap)
|
||||
{ return wxCRT_VsscanfA(wx_static_cast(const char*, str.AsCharBuf()), format, ap); }
|
||||
{ return wxCRT_VsscanfA(static_cast<const char*>(str.AsCharBuf()), format, ap); }
|
||||
int wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap)
|
||||
{ return wxCRT_VsscanfW(str.AsWCharBuf(), format, ap); }
|
||||
#endif // HAVE_NO_VSSCANF
|
||||
|
@@ -71,7 +71,7 @@ wxXLocale& wxXLocale::GetCLocale()
|
||||
{
|
||||
if ( !gs_cLocale )
|
||||
{
|
||||
gs_cLocale = new wxXLocale(wx_static_cast(wxXLocaleCTag *, NULL));
|
||||
gs_cLocale = new wxXLocale(static_cast<wxXLocaleCTag *>(NULL));
|
||||
}
|
||||
|
||||
return *gs_cLocale;
|
||||
|
@@ -1336,7 +1336,7 @@ void wxZipInputStream::Init(const wxString& file)
|
||||
Init();
|
||||
m_allowSeeking = true;
|
||||
wxFFileInputStream *ffile;
|
||||
ffile = wx_static_cast(wxFFileInputStream*, m_parent_i_stream);
|
||||
ffile = static_cast<wxFFileInputStream*>(m_parent_i_stream);
|
||||
wxZipEntryPtr_ entry;
|
||||
|
||||
if (ffile->Ok()) {
|
||||
@@ -2051,7 +2051,7 @@ bool wxZipOutputStream::CopyEntry(wxArchiveEntry *entry,
|
||||
return false;
|
||||
}
|
||||
|
||||
return CopyEntry(zipEntry, wx_static_cast(wxZipInputStream&, stream));
|
||||
return CopyEntry(zipEntry, static_cast<wxZipInputStream&>(stream));
|
||||
}
|
||||
|
||||
bool wxZipOutputStream::CopyArchiveMetaData(wxZipInputStream& inputStream)
|
||||
@@ -2065,7 +2065,7 @@ bool wxZipOutputStream::CopyArchiveMetaData(wxZipInputStream& inputStream)
|
||||
|
||||
bool wxZipOutputStream::CopyArchiveMetaData(wxArchiveInputStream& stream)
|
||||
{
|
||||
return CopyArchiveMetaData(wx_static_cast(wxZipInputStream&, stream));
|
||||
return CopyArchiveMetaData(static_cast<wxZipInputStream&>(stream));
|
||||
}
|
||||
|
||||
void wxZipOutputStream::SetLevel(int level)
|
||||
|
@@ -190,7 +190,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
wxEventLoop * const
|
||||
loop = wx_static_cast(wxEventLoop *, wxEventLoop::GetActive());
|
||||
loop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
|
||||
if ( loop )
|
||||
loop->Yield();
|
||||
|
||||
|
@@ -42,7 +42,7 @@ wxAnimationDecoderList wxAnimation::sm_handlers;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxAnimationBase)
|
||||
#define M_ANIMDATA wx_static_cast(wxAnimationDecoder*, m_refData)
|
||||
#define M_ANIMDATA static_cast<wxAnimationDecoder*>(m_refData)
|
||||
|
||||
wxSize wxAnimation::GetSize() const
|
||||
{
|
||||
|
@@ -785,7 +785,7 @@ size_t wxGenericCalendarCtrl::GetWeek(const wxDateTime& date) const
|
||||
wxSize wxGenericCalendarCtrl::DoGetBestSize() const
|
||||
{
|
||||
// calc the size of the calendar
|
||||
wx_const_cast(wxGenericCalendarCtrl *, this)->RecalcGeometry();
|
||||
const_cast<wxGenericCalendarCtrl *>(this)->RecalcGeometry();
|
||||
|
||||
wxCoord width = 7*m_widthCol,
|
||||
height = 7*m_heightRow + m_rowOffset;
|
||||
|
@@ -2693,7 +2693,7 @@ int wxDataViewMainWindow::GetEndOfLastCol() const
|
||||
for (i = 0; i < GetOwner()->GetColumnCount(); i++)
|
||||
{
|
||||
const wxDataViewColumn *c =
|
||||
wx_const_cast(wxDataViewCtrl*, GetOwner())->GetColumn( i );
|
||||
const_cast<wxDataViewCtrl*>(GetOwner())->GetColumn( i );
|
||||
|
||||
if (!c->IsHidden())
|
||||
width += c->GetWidth();
|
||||
|
@@ -1176,7 +1176,7 @@ void wxGenericFileCtrl::DoSetFilterIndex( int filterindex )
|
||||
if ( !pcd )
|
||||
return;
|
||||
|
||||
const wxString& str = ((wx_static_cast(wxStringClientData *, pcd))->GetData());
|
||||
const wxString& str = ((static_cast<wxStringClientData *>(pcd))->GetData());
|
||||
m_list->SetWild( str );
|
||||
m_filterIndex = filterindex;
|
||||
if ( str.Left( 2 ) == wxT( "*." ) )
|
||||
|
@@ -102,7 +102,7 @@ private:
|
||||
|
||||
static int GetPageId(wxTabView *tabview, wxNotebookPage *page)
|
||||
{
|
||||
return wx_static_cast(wxNotebookTabView*, tabview)->GetId(page);
|
||||
return static_cast<wxNotebookTabView*>(tabview)->GetId(page);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -152,7 +152,7 @@ wxGDIRefData *wxPalette::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxPalette::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxPaletteRefData(*wx_static_cast(const wxPaletteRefData *, data));
|
||||
return new wxPaletteRefData(*static_cast<const wxPaletteRefData *>(data));
|
||||
}
|
||||
|
||||
#endif // wxUSE_PALETTE
|
||||
|
@@ -427,11 +427,11 @@ void wxVListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const
|
||||
flags |= wxCONTROL_SELECTED;
|
||||
if ( IsCurrent(n) )
|
||||
flags |= wxCONTROL_CURRENT;
|
||||
if ( wxWindow::FindFocus() == wx_const_cast(wxVListBox*, this) )
|
||||
if ( wxWindow::FindFocus() == const_cast<wxVListBox*>(this) )
|
||||
flags |= wxCONTROL_FOCUSED;
|
||||
|
||||
wxRendererNative::Get().DrawItemSelectionRect(
|
||||
wx_const_cast(wxVListBox *, this), dc, rect, flags);
|
||||
const_cast<wxVListBox *>(this), dc, rect, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
#if !wxUSE_UNICODE_UTF8
|
||||
for ( size_t n = 0; n < m_count; n++ )
|
||||
free(wx_const_cast(gchar *, m_strings[n]));
|
||||
free(const_cast<gchar *>(m_strings[n]));
|
||||
#endif
|
||||
|
||||
delete [] m_strings;
|
||||
|
@@ -228,7 +228,7 @@ wxBitmapRefData::~wxBitmapRefData()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define M_BMPDATA wx_static_cast(wxBitmapRefData*, m_refData)
|
||||
#define M_BMPDATA static_cast<wxBitmapRefData*>(m_refData)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
||||
|
||||
@@ -258,7 +258,7 @@ wxBitmap::wxBitmap(const char* const* bits)
|
||||
wxCHECK2_MSG(bits != NULL, return, wxT("invalid bitmap data"));
|
||||
|
||||
GdkBitmap* mask = NULL;
|
||||
SetPixmap(gdk_pixmap_create_from_xpm_d(wxGetRootWindow()->window, &mask, NULL, wx_const_cast(char**, bits)));
|
||||
SetPixmap(gdk_pixmap_create_from_xpm_d(wxGetRootWindow()->window, &mask, NULL, const_cast<char**>(bits)));
|
||||
|
||||
if (M_BMPDATA->m_pixmap != NULL && mask != NULL)
|
||||
{
|
||||
@@ -930,7 +930,7 @@ wxGDIRefData* wxBitmap::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData* wxBitmap::CloneGDIRefData(const wxGDIRefData* data) const
|
||||
{
|
||||
const wxBitmapRefData* oldRef = wx_static_cast(const wxBitmapRefData*, data);
|
||||
const wxBitmapRefData* oldRef = static_cast<const wxBitmapRefData*>(data);
|
||||
wxBitmapRefData* newRef = new wxBitmapRefData;
|
||||
newRef->m_width = oldRef->m_width;
|
||||
newRef->m_height = oldRef->m_height;
|
||||
|
@@ -99,7 +99,7 @@ void wxColourDialog::ColourDataToDialog()
|
||||
|
||||
#if wxUSE_LIBHILDON
|
||||
HildonColorSelector * const sel = HILDON_COLOR_SELECTOR(m_widget);
|
||||
hildon_color_selector_set_color(sel, wx_const_cast(GdkColor *, col));
|
||||
hildon_color_selector_set_color(sel, const_cast<GdkColor *>(col));
|
||||
#else // !wxUSE_LIBHILDON
|
||||
GtkColorSelection *sel =
|
||||
GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
|
||||
|
@@ -83,7 +83,7 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define M_COLDATA wx_static_cast(wxColourRefData*, m_refData)
|
||||
#define M_COLDATA static_cast<wxColourRefData*>(m_refData)
|
||||
|
||||
// GDK's values are in 0..65535 range, ours are in 0..255
|
||||
#define SHIFT 8
|
||||
@@ -108,7 +108,7 @@ bool wxColour::operator == ( const wxColour& col ) const
|
||||
return false;
|
||||
|
||||
wxColourRefData* refData = M_COLDATA;
|
||||
wxColourRefData* that_refData = wx_static_cast(wxColourRefData*, col.m_refData);
|
||||
wxColourRefData* that_refData = static_cast<wxColourRefData*>(col.m_refData);
|
||||
return refData->m_red == that_refData->m_red &&
|
||||
refData->m_green == that_refData->m_green &&
|
||||
refData->m_blue == that_refData->m_blue &&
|
||||
|
@@ -49,7 +49,7 @@ wxCursorRefData::~wxCursorRefData()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define M_CURSORDATA wx_static_cast(wxCursorRefData*, m_refData)
|
||||
#define M_CURSORDATA static_cast<wxCursorRefData*>(m_refData)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxGDIObject)
|
||||
|
||||
@@ -361,7 +361,7 @@ wxGDIRefData *wxCursor::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxCursorRefData(*wx_static_cast(const wxCursorRefData *, data));
|
||||
return new wxCursorRefData(*static_cast<const wxCursorRefData *>(data));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -1605,7 +1605,7 @@ bool wxDataViewTextRenderer::GetValue( wxVariant &value ) const
|
||||
GValue gvalue = { 0, };
|
||||
g_value_init( &gvalue, G_TYPE_STRING );
|
||||
g_object_get_property( G_OBJECT(m_renderer), "text", &gvalue );
|
||||
wxString tmp = wxGTK_CONV_BACK_FONT( g_value_get_string( &gvalue ), wx_const_cast(wxDataViewTextRenderer*, this)->GetOwner()->GetOwner()->GetFont() );
|
||||
wxString tmp = wxGTK_CONV_BACK_FONT( g_value_get_string( &gvalue ), const_cast<wxDataViewTextRenderer*>(this)->GetOwner()->GetOwner()->GetFont() );
|
||||
g_value_unset( &gvalue );
|
||||
|
||||
value = tmp;
|
||||
|
@@ -551,5 +551,5 @@ wxGDIRefData* wxFont::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData* wxFont::CloneGDIRefData(const wxGDIRefData* data) const
|
||||
{
|
||||
return new wxFontRefData(*wx_static_cast(const wxFontRefData*, data));
|
||||
return new wxFontRefData(*static_cast<const wxFontRefData*>(data));
|
||||
}
|
||||
|
@@ -174,7 +174,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||
const wxPalette& palette)
|
||||
: m_createImplicitContext(true)
|
||||
{
|
||||
m_sharedContext = wx_const_cast(wxGLContext *, shared);
|
||||
m_sharedContext = const_cast<wxGLContext *>(shared);
|
||||
|
||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
||||
}
|
||||
@@ -189,7 +189,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||
: m_createImplicitContext(true)
|
||||
{
|
||||
m_sharedContext = NULL;
|
||||
m_sharedContextOf = wx_const_cast(wxGLCanvas *, shared);
|
||||
m_sharedContextOf = const_cast<wxGLCanvas *>(shared);
|
||||
|
||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
||||
}
|
||||
|
@@ -404,7 +404,7 @@ void wxMDIChildFrame::SetTitle( const wxString &title )
|
||||
|
||||
void wxMDIClientWindow::AddChildGTK(wxWindowGTK* child)
|
||||
{
|
||||
wxMDIChildFrame* child_frame = wx_static_cast(wxMDIChildFrame*, child);
|
||||
wxMDIChildFrame* child_frame = static_cast<wxMDIChildFrame*>(child);
|
||||
wxString s = child_frame->GetTitle();
|
||||
if (s.IsNull()) s = _("MDI child");
|
||||
|
||||
@@ -417,7 +417,7 @@ void wxMDIClientWindow::AddChildGTK(wxWindowGTK* child)
|
||||
|
||||
child_frame->m_page = (GtkNotebookPage*) (g_list_last(notebook->children)->data);
|
||||
|
||||
wxMDIParentFrame* parent_frame = wx_static_cast(wxMDIParentFrame*, GetParent());
|
||||
wxMDIParentFrame* parent_frame = static_cast<wxMDIParentFrame*>(GetParent());
|
||||
parent_frame->m_justInserted = true;
|
||||
}
|
||||
|
||||
|
@@ -142,7 +142,7 @@ double wxSpinCtrlGTKBase::DoGetValue() const
|
||||
|
||||
GtkDisableEvents();
|
||||
gtk_spin_button_update( GTK_SPIN_BUTTON(m_widget) );
|
||||
wx_const_cast(wxSpinCtrlGTKBase*, this)->m_value =
|
||||
const_cast<wxSpinCtrlGTKBase*>(this)->m_value =
|
||||
gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget));
|
||||
GtkEnableEvents();
|
||||
|
||||
|
@@ -447,7 +447,7 @@ void wxToolBar::SetWindowStyleFlag( long style )
|
||||
|
||||
bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, toolBase);
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(toolBase);
|
||||
|
||||
GSList* radioGroup;
|
||||
switch ( tool->GetStyle() )
|
||||
@@ -552,7 +552,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
|
||||
bool wxToolBar::DoDeleteTool(size_t /* pos */, wxToolBarToolBase* toolBase)
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, toolBase);
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(toolBase);
|
||||
|
||||
if (tool->GetStyle() == wxTOOL_STYLE_CONTROL)
|
||||
{
|
||||
@@ -597,7 +597,7 @@ GSList* wxToolBar::GetRadioGroup(size_t pos)
|
||||
|
||||
void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable)
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, toolBase);
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(toolBase);
|
||||
|
||||
if (tool->m_item)
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(tool->m_item), enable);
|
||||
@@ -605,7 +605,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable)
|
||||
|
||||
void wxToolBar::DoToggleTool( wxToolBarToolBase *toolBase, bool toggle )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, toolBase);
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(toolBase);
|
||||
|
||||
if (tool->m_item)
|
||||
{
|
||||
@@ -653,7 +653,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
|
||||
|
||||
void wxToolBar::SetToolShortHelp( int id, const wxString& helpString )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
|
||||
|
||||
if ( tool )
|
||||
{
|
||||
@@ -668,7 +668,7 @@ void wxToolBar::SetToolShortHelp( int id, const wxString& helpString )
|
||||
|
||||
void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
|
||||
if ( tool )
|
||||
{
|
||||
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
|
||||
@@ -680,7 +680,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
||||
|
||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
|
||||
if ( tool )
|
||||
{
|
||||
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
|
||||
|
@@ -216,7 +216,7 @@ void GTK_EndProcessDetector(gpointer data, gint source,
|
||||
GdkInputCondition WXUNUSED(condition))
|
||||
{
|
||||
wxEndProcessData * const
|
||||
proc_data = wx_static_cast(wxEndProcessData *, data);
|
||||
proc_data = static_cast<wxEndProcessData *>(data);
|
||||
|
||||
// child exited, end waiting
|
||||
close(source);
|
||||
|
@@ -1893,7 +1893,7 @@ wxWindow *wxWindowBase::DoFindFocus()
|
||||
{
|
||||
wxWindowGTK *focus = gs_pendingFocus ? gs_pendingFocus : gs_currentFocus;
|
||||
// the cast is necessary when we compile in wxUniversal mode
|
||||
return wx_static_cast(wxWindow*, focus);
|
||||
return static_cast<wxWindow*>(focus);
|
||||
}
|
||||
|
||||
void wxWindowGTK::AddChildGTK(wxWindowGTK* child)
|
||||
@@ -2633,8 +2633,8 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const
|
||||
if (m_parent)
|
||||
m_parent->ScreenToClient(&org_x, &org_y);
|
||||
|
||||
wx_const_cast(wxWindowGTK*, this)->m_x = org_x;
|
||||
wx_const_cast(wxWindowGTK*, this)->m_y = org_y;
|
||||
const_cast<wxWindowGTK*>(this)->m_x = org_x;
|
||||
const_cast<wxWindowGTK*>(this)->m_y = org_y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -369,7 +369,7 @@ wxGDIRefData *wxBitmap::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxBitmap::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxBitmapRefData(*wx_static_cast(const wxBitmapRefData *, data));
|
||||
return new wxBitmapRefData(*static_cast<const wxBitmapRefData *>(data));
|
||||
}
|
||||
|
||||
bool wxBitmap::Create( int width, int height, int depth )
|
||||
|
@@ -264,7 +264,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n)
|
||||
|
||||
void ** const data = &itemsData[0];
|
||||
if ( HasClientObjectData() )
|
||||
Append(items, wx_reinterpret_cast(wxClientData **, data));
|
||||
Append(items, reinterpret_cast<wxClientData **>(data));
|
||||
else
|
||||
Append(items, data);
|
||||
}
|
||||
|
@@ -327,7 +327,7 @@ wxGDIRefData *wxCursor::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxCursorRefData(*wx_static_cast(const wxCursorRefData *, data));
|
||||
return new wxCursorRefData(*static_cast<const wxCursorRefData *>(data));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -1147,7 +1147,7 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest,
|
||||
wxCHECK_MSG( srcDC, false, "source must be a window DC" );
|
||||
|
||||
// FIXME: this cast is not always valid, see the code using m_isMemDC
|
||||
wxMemoryDCImpl *memDC = wx_static_cast(wxMemoryDCImpl *, srcDC);
|
||||
wxMemoryDCImpl *memDC = static_cast<wxMemoryDCImpl *>(srcDC);
|
||||
|
||||
bool use_bitmap_method = false;
|
||||
bool is_mono = false;
|
||||
|
@@ -543,7 +543,7 @@ wxGDIRefData *wxFont::CreateGDIRefData() const
|
||||
|
||||
wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxFontRefData(*wx_static_cast(const wxFontRefData *, data));
|
||||
return new wxFontRefData(*static_cast<const wxFontRefData *>(data));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -177,7 +177,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||
const wxPalette& palette)
|
||||
: m_createImplicitContext(true)
|
||||
{
|
||||
m_sharedContext = wx_const_cast(wxGLContext *, shared);
|
||||
m_sharedContext = const_cast<wxGLContext *>(shared);
|
||||
|
||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||
const wxPalette& palette )
|
||||
: m_createImplicitContext(true)
|
||||
{
|
||||
m_sharedContextOf = wx_const_cast(wxGLCanvas *, shared);
|
||||
m_sharedContextOf = const_cast<wxGLCanvas *>(shared);
|
||||
|
||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *g
|
||||
gdk_gc_unref( gc );
|
||||
|
||||
// Hack alert
|
||||
wx_static_cast(wxClientDCImpl *, dc.GetImpl())->m_window = pizza->bin_window;
|
||||
static_cast<wxClientDCImpl *>(dc.GetImpl())->m_window = pizza->bin_window;
|
||||
dc.SetTextForeground( *wxWHITE );
|
||||
dc.DrawText( win->GetTitle(), 6, 3 );
|
||||
}
|
||||
@@ -151,7 +151,7 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU
|
||||
gdk_gc_unref( gc );
|
||||
|
||||
// Hack alert
|
||||
wx_static_cast(wxClientDCImpl *, dc.GetImpl())->m_window = pizza->bin_window;
|
||||
static_cast<wxClientDCImpl *>(dc.GetImpl())->m_window = pizza->bin_window;
|
||||
dc.SetTextForeground( *wxWHITE );
|
||||
dc.DrawText( win->GetTitle(), 6, 3 );
|
||||
}
|
||||
|
@@ -149,7 +149,7 @@ static void GetTooltipColors()
|
||||
gs_objects.m_colTooltip = wxColor(c.red >> SHIFT, c.green >> SHIFT, c.blue >> SHIFT);
|
||||
c = tooltips->tip_window->style->fg[GTK_STATE_NORMAL];
|
||||
gs_objects.m_colTooltipText = wxColor(c.red >> SHIFT, c.green >> SHIFT, c.blue >> SHIFT);
|
||||
gtk_object_sink(wx_reinterpret_cast(GtkObject*, tooltips));
|
||||
gtk_object_sink(reinterpret_cast<GtkObject*>(tooltips));
|
||||
}
|
||||
|
||||
wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user