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

Fix some MSVC warnings.

This commit is contained in:
James Crook 2018-03-02 12:02:23 +00:00
parent 29b214367d
commit 6509947de8
4 changed files with 6 additions and 31 deletions

View File

@ -1872,7 +1872,7 @@ int AudioIO::StartStream(const WaveTrackConstArray &playbackTracks,
mLostSamples = 0;
mLostCaptureIntervals.clear();
mDetectDropouts =
gPrefs->Read( WarningDialogKey(wxT("DropoutDetected")), (long)true );
gPrefs->Read( WarningDialogKey(wxT("DropoutDetected")), true ) != 0;
auto cleanup = finally ( [this] { ClearRecordingException(); } );
if( IsBusy() )

View File

@ -903,33 +903,10 @@ void EditChainsDialog::OnRename(wxCommandEvent & WXUNUSED(event))
/// An item in the list has been selected.
/// Bring up a dialog to allow its parameters to be edited.
void EditChainsDialog::OnCommandActivated(wxListEvent &event)
void EditChainsDialog::OnCommandActivated(wxListEvent & WXUNUSED(event))
{
wxCommandEvent dummy;
OnEditCommandParams( dummy );
#if 0
int item = event.GetIndex();
BatchCommandDialog d(this, wxID_ANY);
d.SetCommandAndParams(mBatchCommands.GetCommand(item),
mBatchCommands.GetParams(item));
if (!d.ShowModal()) {
return;
}
mBatchCommands.DeleteFromChain(item);
mBatchCommands.AddToChain(d.mSelectedCommand,
d.mSelectedParameters,
item);
mChanged = true;
mSelectedCommand = item;
PopulateList();
#endif
}
///

View File

@ -4490,14 +4490,12 @@ void AudacityProject::InitialState()
bool AudacityProject::UndoAvailable()
{
auto trackList = GetTracks();
return GetUndoManager()->UndoAvailable() &&
!GetTracks()->HasPendingTracks();
}
bool AudacityProject::RedoAvailable()
{
auto trackList = GetTracks();
return GetUndoManager()->RedoAvailable() &&
!GetTracks()->HasPendingTracks();
}

View File

@ -1810,7 +1810,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
bool endOfFile;
id3len = AddTags(project, id3buffer, &endOfFile, metadata);
if (id3len && !endOfFile) {
if (id3len > outFile.Write(id3buffer.get(), id3len)) {
if (id3len > (int)outFile.Write(id3buffer.get(), id3len)) {
// TODO: more precise message
AudacityMessageBox(_("Unable to export"));
return ProgressResult::Cancelled;
@ -1897,7 +1897,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
break;
}
if (bytes > outFile.Write(buffer.get(), bytes)) {
if (bytes > (int)outFile.Write(buffer.get(), bytes)) {
// TODO: more precise message
AudacityMessageBox(_("Unable to export"));
updateResult = ProgressResult::Cancelled;
@ -1919,7 +1919,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
}
if (bytes > 0) {
if (bytes > outFile.Write(buffer.get(), bytes)) {
if (bytes > (int)outFile.Write(buffer.get(), bytes)) {
// TODO: more precise message
AudacityMessageBox(_("Unable to export"));
return ProgressResult::Cancelled;
@ -1928,7 +1928,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
// Write ID3 tag if it was supposed to be at the end of the file
if (id3len > 0 && endOfFile) {
if (bytes > outFile.Write(id3buffer.get(), id3len)) {
if (bytes > (int)outFile.Write(id3buffer.get(), id3len)) {
// TODO: more precise message
AudacityMessageBox(_("Unable to export"));
return ProgressResult::Cancelled;