Skip to content

Commit

Permalink
Refs #9516. Use static casts instead of dynamic
Browse files Browse the repository at this point in the history
We are sure those will succeed and were not checking the result anyway
  • Loading branch information
arturbekasov committed May 22, 2014
1 parent 9f6bd7c commit eb3bb6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/MantidQt/MantidWidgets/src/PeakPicker.cpp
Expand Up @@ -41,7 +41,7 @@ bool PeakPicker::eventFilter(QObject* object, QEvent* event)
{
case QEvent::MouseButtonPress:
{
auto mouseEvent = dynamic_cast<QMouseEvent*>(event);
auto mouseEvent = static_cast<QMouseEvent*>(event);
Qt::KeyboardModifiers mod = mouseEvent->modifiers();
QPoint p = mouseEvent->pos();

Expand Down Expand Up @@ -74,7 +74,7 @@ bool PeakPicker::eventFilter(QObject* object, QEvent* event)
}
case QEvent::MouseMove:
{
QPoint p = dynamic_cast<QMouseEvent*>(event)->pos();
QPoint p = static_cast<QMouseEvent*>(event)->pos();

// Move, if moving in process
if (m_isMoving)
Expand Down

0 comments on commit eb3bb6c

Please sign in to comment.