1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-16 06:03:49 +01:00

Clean up some dead code and MSVC warnings.

- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
This commit is contained in:
James Crook
2017-12-08 11:26:09 +00:00
parent b63e61d8e9
commit f463eda36c
68 changed files with 216 additions and 510 deletions

View File

@@ -882,7 +882,6 @@ void TrackPanel::HandleMotion( wxMouseState &inState, bool doHit )
UpdateMouseState( inState );
const auto foundCell = FindCell( inState.m_x, inState.m_y );
auto &track = foundCell.pTrack;
auto &rect = foundCell.rect;
auto &pCell = foundCell.pCell;
const TrackPanelMouseState tpmState{ mLastMouseState, rect, pCell };
@@ -951,7 +950,7 @@ void TrackPanel::HandleMotion
auto begin = mTargets.begin(), end = mTargets.end(),
iter = std::find(begin, end, oldHandle);
if (iter != end) {
auto newPosition = iter - begin;
unsigned int newPosition = iter - begin;
if (newPosition <= oldPosition)
mTarget = newPosition;
// else, some NEW hit and this position takes priority
@@ -1746,9 +1745,7 @@ catch( ... )
void TrackPanel::HandleClick( const TrackPanelMouseEvent &tpmEvent )
{
const auto &event = tpmEvent.event;
auto pCell = tpmEvent.pCell;
const auto &rect = tpmEvent.rect;
auto pTrack = static_cast<CommonTrackPanelCell *>( pCell.get() )->FindTrack();
// Do hit test once more, in case the button really pressed was not the
@@ -2291,7 +2288,8 @@ void TrackInfo::VelocitySliderDrawFunction
#endif
void TrackInfo::MuteOrSoloDrawFunction
( wxDC *dc, const wxRect &bev, const Track *pTrack, bool down, bool captured,
( wxDC *dc, const wxRect &bev, const Track *pTrack, bool down,
bool WXUNUSED(captured),
bool solo, bool hit )
{
//bev.Inflate(-1, -1);