]> git.saurik.com Git - wxWidgets.git/commitdiff
replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Nov 2008 02:43:11 +0000 (02:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Nov 2008 02:43:11 +0000 (02:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp
samples/internat/internat.cpp
samples/ipc/connection.h
samples/mfc/mfctest.cpp
samples/notebook/notebook.cpp
samples/widgets/static.cpp
utils/wxrc/wxrc.cpp

index 1902bdf531d1f24a4db19e8aa39b2fdfe6c4ae6b..ab41f78dc8583106335743b39360bdb5f584c186 100644 (file)
@@ -1315,7 +1315,7 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
 
 static wxString GetDataString(wxClientData *data)
 {
-    return data ? wx_static_cast(wxStringClientData *, data)->GetData()
+    return data ? static_cast<wxStringClientData *>(data)->GetData()
                 : wxString("none");
 }
 
index a9d2233b4d1b83abf1b7e2a8906c191e20ed33d8..96f289c2c6f421ae2d36a1e608495e282f6c3438 100644 (file)
@@ -194,7 +194,7 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
             return false;
         }
 
-        m_lang = wx_static_cast(wxLanguage, lang->Language);
+        m_lang = static_cast<wxLanguage>(lang->Language);
     }
 
     return true;
index 42d1816a0714d66d9e0eec355aa54cec63545e5e..bf01ab5d3e5fe387350e85d914bb2ceb58f33db4 100644 (file)
@@ -36,23 +36,23 @@ protected:
         switch (format)
         {
           case wxIPC_TEXT:
-              s += wxString(wx_static_cast(const char *, data), size);
+              s += wxString(static_cast<const char *>(data), size);
               break;
 
 #if wxUSE_UNICODE
           case wxIPC_UNICODETEXT:
-              s += wxString(wx_static_cast(const wchar_t *, data), size);
+              s += wxString(static_cast<const wchar_t *>(data), size);
               break;
 #endif // wxUSE_UNICODE
 
           case wxIPC_UTF8TEXT:
-              s += wxString::FromUTF8(wx_static_cast(const char *, data), size);
+              s += wxString::FromUTF8(static_cast<const char *>(data), size);
               break;
 
           case wxIPC_PRIVATE:
               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] << '"';
               }
               else
index 245feb580c346da79a28be26dfe850b96a6fff5a..a4102648a94a6febd46df3f220b228f6d33fb0bc 100644 (file)
@@ -228,7 +228,7 @@ int CTheApp::ExitInstance()
 BOOL CTheApp::PreTranslateMessage(MSG *msg)
 {
     wxEventLoop * const
-        evtLoop = wx_static_cast(wxEventLoop *, wxEventLoop::GetActive());
+        evtLoop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
     if ( evtLoop && evtLoop->PreProcessMessage(msg) )
         return TRUE;
 
index 14f3fd951c3e98293b16a2811def5c8cdd719b0a..b38e8605282610cec09d0cc08e8be07a88de6ba0 100644 (file)
@@ -604,7 +604,7 @@ void MyFrame::OnHitTest(wxCommandEvent& WXUNUSED(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 )
         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
             //     wxRTTI
             const wxBookCtrlBase * const
-                book = wx_static_cast(wxBookCtrlBase *, event.GetEventObject());
+                book = static_cast<wxBookCtrlBase *>(event.GetEventObject());
             if ( idx != wxNOT_FOUND &&
                     book && book->GetPageText(idx) == VETO_PAGE_NAME )
             {
index 7987424ac1279d7b774e6b8964e07d4e0b30303a..463d40c2273c254222a648a4be8ea680e948771a 100644 (file)
@@ -499,7 +499,7 @@ void StaticWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(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());
     }
index fef806dec4516408526bfb93e25d5d81dca59d6c..940913e55524ed81decd839cee275f65538c19af 100644 (file)
@@ -581,7 +581,7 @@ static wxString FileToCppArray(wxString filename, int num)
     wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
 
     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") );
 
     snum.Printf(_T("%i"), num);
@@ -735,7 +735,7 @@ static wxString FileToPythonArray(wxString filename, int num)
     wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
 
     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") );
 
     snum.Printf(_T("%i"), num);