From e687d14903a212199e0d87e1a3a5260b1812620e Mon Sep 17 00:00:00 2001 From: John Beard Date: Tue, 23 Apr 2019 17:39:34 +0100 Subject: [PATCH] Remove useless const_casts Both versions of EDA_DRAW_FRAME::isBusy have a useless const_cast. GetScreen() const returns a non-const SCH_SCREEN already, it doesn't need to be cast, and it's stored in const SCH_SCREEN anyway. --- common/legacy_gal/eda_draw_frame.cpp | 2 +- common/legacy_wx/eda_draw_frame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/legacy_gal/eda_draw_frame.cpp b/common/legacy_gal/eda_draw_frame.cpp index b1222cac67..b45af6adc0 100644 --- a/common/legacy_gal/eda_draw_frame.cpp +++ b/common/legacy_gal/eda_draw_frame.cpp @@ -1176,7 +1176,7 @@ bool EDA_DRAW_FRAME::GeneralControlKeyMovement( int aHotKey, wxPoint *aPos, bool bool EDA_DRAW_FRAME::isBusy() const { - const BASE_SCREEN* screen = const_cast< BASE_SCREEN* >( GetScreen() ); + const BASE_SCREEN* screen = GetScreen(); if( !screen ) return false; diff --git a/common/legacy_wx/eda_draw_frame.cpp b/common/legacy_wx/eda_draw_frame.cpp index 74ff6d14c6..4e46faaa0f 100644 --- a/common/legacy_wx/eda_draw_frame.cpp +++ b/common/legacy_wx/eda_draw_frame.cpp @@ -1532,7 +1532,7 @@ bool EDA_DRAW_FRAME::GeneralControlKeyMovement( int aHotKey, wxPoint *aPos, bool bool EDA_DRAW_FRAME::isBusy() const { - const BASE_SCREEN* screen = const_cast< BASE_SCREEN* >( GetScreen() ); + const BASE_SCREEN* screen = GetScreen(); if( !screen ) return false;