diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:08:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:28 +0100 |
commit | 18804c92e10c7f4572b9698b1cf6dc86db8d6f32 (patch) | |
tree | 871d06b7a7430c9b5ef93910ab46eb26ead5ffa6 /include/vcl | |
parent | 33875d862ad5d870cfd1f67d5ef9ad91b8be740f (diff) |
Clean up C-style casts from pointers to void
Change-Id: Iad602cece6e328c7f5d5f36adb294c97b152ade3
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/cmdevt.hxx | 20 | ||||
-rw-r--r-- | include/vcl/event.hxx | 8 | ||||
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx index 851c5d9aec1e..ad6a9dc72d25 100644 --- a/include/vcl/cmdevt.hxx +++ b/include/vcl/cmdevt.hxx @@ -447,7 +447,7 @@ inline CommandEvent::CommandEvent( const Point& rMousePos, inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const { if ( mnCommand == COMMAND_EXTTEXTINPUT ) - return (const CommandExtTextInputData*)mpData; + return static_cast<const CommandExtTextInputData*>(mpData); else return NULL; } @@ -455,7 +455,7 @@ inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const inline const CommandInputContextData* CommandEvent::GetInputContextChangeData() const { if ( mnCommand == COMMAND_INPUTCONTEXTCHANGE ) - return (const CommandInputContextData*)mpData; + return static_cast<const CommandInputContextData*>(mpData); else return NULL; } @@ -463,7 +463,7 @@ inline const CommandInputContextData* CommandEvent::GetInputContextChangeData() inline const CommandWheelData* CommandEvent::GetWheelData() const { if ( mnCommand == COMMAND_WHEEL ) - return (const CommandWheelData*)mpData; + return static_cast<const CommandWheelData*>(mpData); else return NULL; } @@ -471,7 +471,7 @@ inline const CommandWheelData* CommandEvent::GetWheelData() const inline const CommandScrollData* CommandEvent::GetAutoScrollData() const { if ( mnCommand == COMMAND_AUTOSCROLL ) - return (const CommandScrollData*)mpData; + return static_cast<const CommandScrollData*>(mpData); else return NULL; } @@ -479,7 +479,7 @@ inline const CommandScrollData* CommandEvent::GetAutoScrollData() const inline const CommandModKeyData* CommandEvent::GetModKeyData() const { if( mnCommand == COMMAND_MODKEYCHANGE ) - return (const CommandModKeyData*)mpData; + return static_cast<const CommandModKeyData*>(mpData); else return NULL; } @@ -487,7 +487,7 @@ inline const CommandModKeyData* CommandEvent::GetModKeyData() const inline const CommandDialogData* CommandEvent::GetDialogData() const { if( mnCommand == COMMAND_SHOWDIALOG ) - return (const CommandDialogData*)mpData; + return static_cast<const CommandDialogData*>(mpData); else return NULL; } @@ -495,7 +495,7 @@ inline const CommandDialogData* CommandEvent::GetDialogData() const inline CommandMediaData* CommandEvent::GetMediaData() const { if( mnCommand == COMMAND_MEDIA ) - return (CommandMediaData*)(mpData); + return static_cast<CommandMediaData*>(mpData); else return NULL; } @@ -503,7 +503,7 @@ inline CommandMediaData* CommandEvent::GetMediaData() const inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() const { if( mnCommand == COMMAND_SELECTIONCHANGE ) - return (const CommandSelectionChangeData*)mpData; + return static_cast<const CommandSelectionChangeData*>(mpData); else return NULL; } @@ -511,7 +511,7 @@ inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() inline const CommandSwipeData* CommandEvent::GetSwipeData() const { if( mnCommand == COMMAND_SWIPE ) - return (const CommandSwipeData*)(mpData); + return static_cast<const CommandSwipeData*>(mpData); else return NULL; } @@ -519,7 +519,7 @@ inline const CommandSwipeData* CommandEvent::GetSwipeData() const inline const CommandLongPressData* CommandEvent::GetLongPressData() const { if( mnCommand == COMMAND_LONGPRESS ) - return (const CommandLongPressData*)(mpData); + return static_cast<const CommandLongPressData*>(mpData); else return NULL; } diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 990a7ec0033b..8ad67fb0efdc 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -455,7 +455,7 @@ inline NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWind inline const KeyEvent* NotifyEvent::GetKeyEvent() const { if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) ) - return (const KeyEvent*)mpData; + return static_cast<const KeyEvent*>(mpData); else return NULL; } @@ -463,7 +463,7 @@ inline const KeyEvent* NotifyEvent::GetKeyEvent() const inline const MouseEvent* NotifyEvent::GetMouseEvent() const { if ( (mnEventType >= MouseNotifyEvent::MOUSEBUTTONDOWN) && (mnEventType <= MouseNotifyEvent::MOUSEMOVE) ) - return (const MouseEvent*)mpData; + return static_cast<const MouseEvent*>(mpData); else return NULL; } @@ -471,7 +471,7 @@ inline const MouseEvent* NotifyEvent::GetMouseEvent() const inline const CommandEvent* NotifyEvent::GetCommandEvent() const { if ( mnEventType == MouseNotifyEvent::COMMAND ) - return (const CommandEvent*)mpData; + return static_cast<const CommandEvent*>(mpData); else return NULL; } @@ -529,7 +529,7 @@ inline DataChangedEvent::DataChangedEvent( DataChangedEventType nType, inline const AllSettings* DataChangedEvent::GetOldSettings() const { if ( mnType == DataChangedEventType::SETTINGS ) - return (const AllSettings*)mpData; + return static_cast<const AllSettings*>(mpData); else return NULL; } diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 0e98da6a6878..8be646e913b9 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -81,7 +81,7 @@ struct GLWindow return GL_FALSE; } - deleteThis=lookHere=(char*)malloc(strlen(reinterpret_cast<const char*>(extString))+1); + deleteThis=lookHere=static_cast<char*>(malloc(strlen(reinterpret_cast<const char*>(extString))+1)); if (lookHere==NULL) { return GL_FALSE; |