1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 22:12:58 +02:00

Fix signed/unsigned comparison warnings.

This commit is contained in:
James Crook
2019-12-06 11:33:22 +00:00
parent 7f3c40eb43
commit 23f05c618c
7 changed files with 11 additions and 14 deletions

View File

@@ -844,7 +844,7 @@ void LabelTrackView::Draw(
void LabelTrackView::SetSelectedIndex( int index )
{
if ( index >= 0 && index < FindLabelTrack()->GetLabels().size() )
if ( index >= 0 && index < (int)FindLabelTrack()->GetLabels().size() )
mSelIndex = index;
else
mSelIndex = -1;

View File

@@ -133,14 +133,14 @@ struct SubViewAdjuster
} );
auto index = iter - begin;
auto size = mPermutation.size();
if ( index < size ) {
if ( index < (int)size ) {
yy -= top;
if ( yy >= 0 && yy < HotZoneSize && index > 0 )
return { index, true }; // top hit
if ( yy < height && yy >= height - HotZoneSize &&
// Have not yet called ModifyPermutation; dragging bottom of
// bottommost view allowed only if at least one view is invisible
( index < size - 1 || mFirstSubView > 0 ) )
( index < (int)size - 1 || mFirstSubView > 0 ) )
return { index, false }; // bottom hit
}
return { size, false }; // not hit