1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Linty fixes

This commit fixes a number of warnings shown in compilation with MSVC.  No behavioral changes intended.  I did not fix signed/unsigned warnings.
This commit is contained in:
James Crook 2017-11-07 09:14:00 +00:00
parent 26a6815db8
commit c28be778e2
9 changed files with 9 additions and 9 deletions

View File

@ -1595,7 +1595,7 @@ void LabelTrack::HandleGlyphClick
float t = 0.0;
// We move if we hit the centre, we adjust one edge if we hit a chevron.
// This is if we are moving just one edge.
hit.mbIsMoving = hit.mEdge & 4;
hit.mbIsMoving = (hit.mEdge & 4)!=0;
// When we start dragging the label(s) we don't want them to jump.
// so we calculate the displacement of the mouse from the drag center
// and use that in subsequent dragging calculations. The mouse stays

View File

@ -3214,7 +3214,7 @@ void TrackInfo::DrawBordersWithin
GetMuteSoloRect( rect, buttonRect, false, true, &track );
bool bHasMuteSolo = dynamic_cast<const PlayableTrack*>( &track );
bool bHasMuteSolo = dynamic_cast<const PlayableTrack*>( &track ) != NULL;
if( bHasMuteSolo && !TrackInfo::HideTopItem( rect, buttonRect ) )
{
// above mute/solo

View File

@ -2437,7 +2437,6 @@ void WaveTrack::SplitAt(double t)
{
if (c->WithinClip(t))
{
double val;
t = LongSamplesToTime(TimeToLongSamples(t)); // put t on a sample
auto newClip = make_movable<WaveClip>( *c, mDirManager, true );
c->Clear(t, c->GetEndTime());

View File

@ -53,7 +53,7 @@ try
mAudioFileName = std::move(audioFileName);
mFormat = int16Sample;
}
catch ( const FileException & e )
catch ( const FileException & WXUNUSED(e) )
{
// The constructor SimpleBlockFile sometimes throws this,
// but it never will for the arguments that were passed to it here.
@ -319,7 +319,7 @@ bool ODDecodeBlockFile::IsSummaryAvailable() const
bool ODDecodeBlockFile::IsDataAvailable() const
{
return mDataAvailable;
return mDataAvailable != 0;
}
/// Write the summary to disk, using the derived ReadData() to get the data

View File

@ -1641,7 +1641,7 @@ bool Effect::ProcessTrack(int count,
{
processed = ProcessBlock(inBufPos.get(), outBufPos.get(), curBlockSize);
}
catch( const AudacityException &e )
catch( const AudacityException & WXUNUSED(e) )
{
// PRL: Bug 437:
// Pass this along to our application-level handler

View File

@ -129,7 +129,7 @@ UIHandle::Result LabelGlyphHandle::Drag
HitTestPreview LabelGlyphHandle::Preview
(const TrackPanelMouseState &, const AudacityProject *)
{
return HitPreview( mHit.mEdge & 4 );
return HitPreview( (mHit.mEdge & 4 )!=0);
}
UIHandle::Result LabelGlyphHandle::Release

View File

@ -54,7 +54,7 @@ enum {
bool SelectHandle::IsClicked() const
{
return mSelectionStateChanger.get();
return mSelectionStateChanger.get() != NULL;
}
namespace

View File

@ -144,7 +144,7 @@ void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
wxFileName( FileNames::HtmlHelpDir(), href.Mid( 10 ) + wxT(".htm") ).GetFullPath();
if( wxFileExists( FileName ) )
{
HelpSystem::ShowHelp(this, FileName, wxEmptyString);
HelpSystem::ShowHelp(this, FileName, wxEmptyString, false);
return;
}
else

View File

@ -596,6 +596,7 @@ return theArray.Get();
(NumericConverter::Type type)
{
switch (type) {
default:
case NumericConverter::TIME:
return TimeConverterFormats();
case NumericConverter::FREQUENCY: