replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-02 02:43:11 +00:00
parent 5c33522fca
commit 81d3348a9b
7 changed files with 12 additions and 12 deletions

View File

@@ -1315,7 +1315,7 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
static wxString GetDataString(wxClientData *data) static wxString GetDataString(wxClientData *data)
{ {
return data ? wx_static_cast(wxStringClientData *, data)->GetData() return data ? static_cast<wxStringClientData *>(data)->GetData()
: wxString("none"); : wxString("none");
} }

View File

@@ -194,7 +194,7 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
return false; return false;
} }
m_lang = wx_static_cast(wxLanguage, lang->Language); m_lang = static_cast<wxLanguage>(lang->Language);
} }
return true; return true;

View File

@@ -36,23 +36,23 @@ protected:
switch (format) switch (format)
{ {
case wxIPC_TEXT: case wxIPC_TEXT:
s += wxString(wx_static_cast(const char *, data), size); s += wxString(static_cast<const char *>(data), size);
break; break;
#if wxUSE_UNICODE #if wxUSE_UNICODE
case wxIPC_UNICODETEXT: case wxIPC_UNICODETEXT:
s += wxString(wx_static_cast(const wchar_t *, data), size); s += wxString(static_cast<const wchar_t *>(data), size);
break; break;
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE
case wxIPC_UTF8TEXT: case wxIPC_UTF8TEXT:
s += wxString::FromUTF8(wx_static_cast(const char *, data), size); s += wxString::FromUTF8(static_cast<const char *>(data), size);
break; break;
case wxIPC_PRIVATE: case wxIPC_PRIVATE:
if ( size == 3 ) if ( size == 3 )
{ {
const char *bytes = wx_static_cast(const char *, data); const char *bytes = static_cast<const char *>(data);
s << '"' << bytes[0] << bytes[1] << bytes[2] << '"'; s << '"' << bytes[0] << bytes[1] << bytes[2] << '"';
} }
else else

View File

@@ -228,7 +228,7 @@ int CTheApp::ExitInstance()
BOOL CTheApp::PreTranslateMessage(MSG *msg) BOOL CTheApp::PreTranslateMessage(MSG *msg)
{ {
wxEventLoop * const wxEventLoop * const
evtLoop = wx_static_cast(wxEventLoop *, wxEventLoop::GetActive()); evtLoop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
if ( evtLoop && evtLoop->PreProcessMessage(msg) ) if ( evtLoop && evtLoop->PreProcessMessage(msg) )
return TRUE; return TRUE;

View File

@@ -604,7 +604,7 @@ void MyFrame::OnHitTest(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnType(wxCommandEvent& event) void MyFrame::OnType(wxCommandEvent& event)
{ {
m_type = wx_static_cast(BookType, event.GetId() - ID_BOOK_NOTEBOOK); m_type = static_cast<BookType>(event.GetId() - ID_BOOK_NOTEBOOK);
if ( m_bookCtrl ) if ( m_bookCtrl )
m_sizerFrame->Hide(m_bookCtrl); m_sizerFrame->Hide(m_bookCtrl);
@@ -919,7 +919,7 @@ void MyFrame::OnBookCtrl(wxBookCtrlBaseEvent& event)
// NB: can't use wxStaticCast here as wxBookCtrlBase is not in // NB: can't use wxStaticCast here as wxBookCtrlBase is not in
// wxRTTI // wxRTTI
const wxBookCtrlBase * const const wxBookCtrlBase * const
book = wx_static_cast(wxBookCtrlBase *, event.GetEventObject()); book = static_cast<wxBookCtrlBase *>(event.GetEventObject());
if ( idx != wxNOT_FOUND && if ( idx != wxNOT_FOUND &&
book && book->GetPageText(idx) == VETO_PAGE_NAME ) book && book->GetPageText(idx) == VETO_PAGE_NAME )
{ {

View File

@@ -499,7 +499,7 @@ void StaticWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
void StaticWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event) void StaticWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event)
{ {
if (event.GetEventObject() == wx_static_cast(wxObject*, m_chkEllipsize)) if (event.GetEventObject() == static_cast<wxObject*>(m_chkEllipsize))
{ {
m_radioEllipsize->Enable(event.IsChecked()); m_radioEllipsize->Enable(event.IsChecked());
} }

View File

@@ -581,7 +581,7 @@ static wxString FileToCppArray(wxString filename, int num)
wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") ); wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
const size_t lng = wx_truncate_cast(size_t, offset); const size_t lng = wx_truncate_cast(size_t, offset);
wxASSERT_MSG( wx_static_cast(wxFileOffset, lng) == offset, wxASSERT_MSG( static_cast<wxFileOffset>(lng) == offset,
wxT("Huge file not supported") ); wxT("Huge file not supported") );
snum.Printf(_T("%i"), num); snum.Printf(_T("%i"), num);
@@ -735,7 +735,7 @@ static wxString FileToPythonArray(wxString filename, int num)
wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") ); wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
const size_t lng = wx_truncate_cast(size_t, offset); const size_t lng = wx_truncate_cast(size_t, offset);
wxASSERT_MSG( wx_static_cast(wxFileOffset, lng) == offset, wxASSERT_MSG( static_cast<wxFileOffset>(lng) == offset,
wxT("Huge file not supported") ); wxT("Huge file not supported") );
snum.Printf(_T("%i"), num); snum.Printf(_T("%i"), num);