mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-20 22:30:05 +02:00
Fix signed/unsigned comparison warnings.
This commit is contained in:
parent
7f3c40eb43
commit
23f05c618c
@ -278,7 +278,7 @@ const wxArrayStringEx &EnumValueSymbols::GetInternals() const
|
|||||||
//////////
|
//////////
|
||||||
const EnumValueSymbol &ChoiceSetting::Default() const
|
const EnumValueSymbol &ChoiceSetting::Default() const
|
||||||
{
|
{
|
||||||
if ( mDefaultSymbol >= 0 && mDefaultSymbol < mSymbols.size() )
|
if ( mDefaultSymbol >= 0 && mDefaultSymbol < (long)mSymbols.size() )
|
||||||
return mSymbols[ mDefaultSymbol ];
|
return mSymbols[ mDefaultSymbol ];
|
||||||
static EnumValueSymbol empty;
|
static EnumValueSymbol empty;
|
||||||
return empty;
|
return empty;
|
||||||
@ -399,9 +399,9 @@ void EnumSettingBase::Migrate( wxString &value )
|
|||||||
// Audacity. But further changes will be stored only to the NEW key
|
// Audacity. But further changes will be stored only to the NEW key
|
||||||
// and won't be seen then.
|
// and won't be seen then.
|
||||||
auto index = (long) FindInt( intValue );
|
auto index = (long) FindInt( intValue );
|
||||||
if ( index >= mSymbols.size() )
|
if ( index >= (long)mSymbols.size() )
|
||||||
index = mDefaultSymbol;
|
index = mDefaultSymbol;
|
||||||
if ( index >= 0 && index < mSymbols.size() ) {
|
if ( index >= 0 && index < (long)mSymbols.size() ) {
|
||||||
value = mSymbols[index].Internal();
|
value = mSymbols[index].Internal();
|
||||||
Write(value);
|
Write(value);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
|
@ -1242,8 +1242,6 @@ void ProjectWindow::OnIconize(wxIconizeEvent &event)
|
|||||||
// void return? I don't know.
|
// void return? I don't know.
|
||||||
mIconized = event.IsIconized();
|
mIconized = event.IsIconized();
|
||||||
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
// VisibileProjectCount seems to be just a counter for debugging.
|
// VisibileProjectCount seems to be just a counter for debugging.
|
||||||
// It's not used outside this function.
|
// It's not used outside this function.
|
||||||
auto VisibleProjectCount = std::count_if(
|
auto VisibleProjectCount = std::count_if(
|
||||||
|
@ -395,7 +395,7 @@ wxChoice * ShuttleGuiBase::AddChoice( const wxString &Prompt,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
pChoice->SetName(wxStripMenuCodes(Prompt));
|
pChoice->SetName(wxStripMenuCodes(Prompt));
|
||||||
if ( Selected >= 0 && Selected < choices.size() )
|
if ( Selected >= 0 && Selected < (int)choices.size() )
|
||||||
pChoice->SetSelection( Selected );
|
pChoice->SetSelection( Selected );
|
||||||
|
|
||||||
UpdateSizers();
|
UpdateSizers();
|
||||||
@ -1499,7 +1499,7 @@ wxRadioButton * ShuttleGuiBase::TieRadioButton()
|
|||||||
wxASSERT( mRadioCount >= 0); // Did you remember to use StartRadioButtonGroup() ?
|
wxASSERT( mRadioCount >= 0); // Did you remember to use StartRadioButtonGroup() ?
|
||||||
|
|
||||||
EnumValueSymbol symbol;
|
EnumValueSymbol symbol;
|
||||||
if (mRadioCount >= 0 && mRadioCount < mRadioSymbols.size() )
|
if (mRadioCount >= 0 && mRadioCount < (int)mRadioSymbols.size() )
|
||||||
symbol = mRadioSymbols[ mRadioCount ];
|
symbol = mRadioSymbols[ mRadioCount ];
|
||||||
|
|
||||||
// In what follows, WrappedRef is used in read only mode, but we
|
// In what follows, WrappedRef is used in read only mode, but we
|
||||||
@ -1976,7 +1976,7 @@ wxChoice * ShuttleGuiBase::TieNumberAsChoice(
|
|||||||
InternalChoices =
|
InternalChoices =
|
||||||
transform_container<wxArrayStringEx>(*pInternalChoices, fn);
|
transform_container<wxArrayStringEx>(*pInternalChoices, fn);
|
||||||
else
|
else
|
||||||
for ( int ii = 0; ii < Choices.size(); ++ii )
|
for ( int ii = 0; ii < (int)Choices.size(); ++ii )
|
||||||
InternalChoices.push_back( fn( ii ) );
|
InternalChoices.push_back( fn( ii ) );
|
||||||
|
|
||||||
|
|
||||||
@ -1989,7 +1989,7 @@ wxChoice * ShuttleGuiBase::TieNumberAsChoice(
|
|||||||
defaultIndex = make_iterator_range( *pInternalChoices ).index( Default );
|
defaultIndex = make_iterator_range( *pInternalChoices ).index( Default );
|
||||||
else
|
else
|
||||||
defaultIndex = Default;
|
defaultIndex = Default;
|
||||||
if ( defaultIndex < 0 || defaultIndex >= Choices.size() )
|
if ( defaultIndex < 0 || defaultIndex >= (int)Choices.size() )
|
||||||
defaultIndex = -1;
|
defaultIndex = -1;
|
||||||
|
|
||||||
ChoiceSetting choiceSetting{
|
ChoiceSetting choiceSetting{
|
||||||
|
@ -48,7 +48,6 @@ SoundActivatedRecordDialog::~SoundActivatedRecordDialog()
|
|||||||
void SoundActivatedRecordDialog::PopulateOrExchange(ShuttleGui & S)
|
void SoundActivatedRecordDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
int dBRange;
|
|
||||||
|
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ bool SetLabelCommand::Apply(const CommandContext & context)
|
|||||||
for (auto lt : tracks.Any<LabelTrack>()) {
|
for (auto lt : tracks.Any<LabelTrack>()) {
|
||||||
const auto &labels = lt->GetLabels();
|
const auto &labels = lt->GetLabels();
|
||||||
const auto nLabels = labels.size();
|
const auto nLabels = labels.size();
|
||||||
if( ii >= nLabels )
|
if( ii >= (int)nLabels )
|
||||||
ii -= nLabels;
|
ii -= nLabels;
|
||||||
else {
|
else {
|
||||||
labelTrack = lt;
|
labelTrack = lt;
|
||||||
|
@ -844,7 +844,7 @@ void LabelTrackView::Draw(
|
|||||||
|
|
||||||
void LabelTrackView::SetSelectedIndex( int index )
|
void LabelTrackView::SetSelectedIndex( int index )
|
||||||
{
|
{
|
||||||
if ( index >= 0 && index < FindLabelTrack()->GetLabels().size() )
|
if ( index >= 0 && index < (int)FindLabelTrack()->GetLabels().size() )
|
||||||
mSelIndex = index;
|
mSelIndex = index;
|
||||||
else
|
else
|
||||||
mSelIndex = -1;
|
mSelIndex = -1;
|
||||||
|
@ -133,14 +133,14 @@ struct SubViewAdjuster
|
|||||||
} );
|
} );
|
||||||
auto index = iter - begin;
|
auto index = iter - begin;
|
||||||
auto size = mPermutation.size();
|
auto size = mPermutation.size();
|
||||||
if ( index < size ) {
|
if ( index < (int)size ) {
|
||||||
yy -= top;
|
yy -= top;
|
||||||
if ( yy >= 0 && yy < HotZoneSize && index > 0 )
|
if ( yy >= 0 && yy < HotZoneSize && index > 0 )
|
||||||
return { index, true }; // top hit
|
return { index, true }; // top hit
|
||||||
if ( yy < height && yy >= height - HotZoneSize &&
|
if ( yy < height && yy >= height - HotZoneSize &&
|
||||||
// Have not yet called ModifyPermutation; dragging bottom of
|
// Have not yet called ModifyPermutation; dragging bottom of
|
||||||
// bottommost view allowed only if at least one view is invisible
|
// 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 { index, false }; // bottom hit
|
||||||
}
|
}
|
||||||
return { size, false }; // not hit
|
return { size, false }; // not hit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user