1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

Fix many MSVC compiler warnings.

This commit is contained in:
James Crook 2018-10-29 13:19:33 +00:00
parent 6fe0c6dd45
commit 76166135d4
10 changed files with 19 additions and 12 deletions

View File

@ -220,9 +220,9 @@ void VisitItem( AudacityProject &project, MenuTable::BaseItem *pItem )
else
if (const auto pSpecial =
dynamic_cast<SpecialItem*>( pItem )) {
const auto pMenu = manager.CurrentMenu();
wxASSERT( pMenu );
pSpecial->fn( project, *pMenu );
const auto pCurrentMenu = manager.CurrentMenu();
wxASSERT( pCurrentMenu );
pSpecial->fn( project, *pCurrentMenu );
}
else
wxASSERT( false );

View File

@ -25,7 +25,7 @@
#include "widgets/ASlider.h"
#include "widgets/wxPanelWrapper.h"
class TrackListEvent;
struct TrackListEvent;
// containment hierarchy:
// MixerBoardFrame -> MixerBoard -> MixerBoardScrolledWindow -> MixerTrackCluster(s)

View File

@ -36,7 +36,7 @@ void SelectionState::SelectTrackLength
void SelectionState::SelectTrack(
Track &track, bool selected, bool updateLastPicked )
{
bool wasCorrect = (selected == track.GetSelected());
//bool wasCorrect = (selected == track.GetSelected());
for (auto channel : TrackList::Channels(&track))
channel->SetSelected(selected);

View File

@ -33,7 +33,7 @@ class LabelTrack;
class SpectrumAnalyst;
class Track;
class TrackList;
class TrackListEvent;
struct TrackListEvent;
class TrackPanel;
class TrackArtist;
class Ruler;

View File

@ -570,7 +570,8 @@ namespace MenuTable {
std::forward<Args>(args)... ); }
inline BaseItemPtr Items(
const wxString &title, BaseItemPtrs &&items )
{ return std::make_unique<GroupItem>( std::move( items ) ); }
{ (void)title; // Compiler food
return std::make_unique<GroupItem>( std::move( items ) ); }
// Menu items can be constructed two ways, as for group items
// Items will appear in a main toolbar menu or in a sub-menu

View File

@ -218,7 +218,7 @@ void DoUndo(AudacityProject &project)
{
auto trackPanel = project.GetTrackPanel();
auto &undoManager = *project.GetUndoManager();
auto historyWindow = project.GetHistoryWindow();
//auto historyWindow = project.GetHistoryWindow();
if (!project.UndoAvailable()) {
AudacityMessageBox(_("Nothing to undo"));
@ -254,7 +254,7 @@ void OnRedo(const CommandContext &context)
auto &project = context.project;
auto trackPanel = project.GetTrackPanel();
auto &undoManager = *project.GetUndoManager();
auto historyWindow = project.GetHistoryWindow();
//auto historyWindow = project.GetHistoryWindow();
if (!project.RedoAvailable()) {
AudacityMessageBox(_("Nothing to redo"));
@ -282,7 +282,7 @@ void OnCut(const CommandContext &context)
auto trackPanel = project.GetTrackPanel();
auto &selectedRegion = project.GetViewInfo().selectedRegion;
auto ruler = project.GetRulerPanel();
auto historyWindow = project.GetHistoryWindow();
//auto historyWindow = project.GetHistoryWindow();
// This doesn't handle cutting labels, it handles
// cutting the _text_ inside of labels, i.e. if you're
@ -392,7 +392,7 @@ void OnCopy(const CommandContext &context)
auto tracks = project.GetTracks();
auto trackPanel = project.GetTrackPanel();
auto &selectedRegion = project.GetViewInfo().selectedRegion;
auto historyWindow = project.GetHistoryWindow();
//auto historyWindow = project.GetHistoryWindow();
for (auto lt : tracks->Selected< LabelTrack >()) {
if (lt->CopySelectedText()) {
@ -723,7 +723,7 @@ void OnSplitCut(const CommandContext &context)
auto &project = context.project;
auto tracks = project.GetTracks();
auto &selectedRegion = project.GetViewInfo().selectedRegion;
auto historyWindow = project.GetHistoryWindow();
//auto historyWindow = project.GetHistoryWindow();
AudacityProject::ClearClipboard();
@ -1080,6 +1080,7 @@ MenuTable::BaseItemPtr LabelEditMenus( AudacityProject &project );
MenuTable::BaseItemPtr EditMenu( AudacityProject &project )
{
(void)project;// Compiler food
using namespace MenuTable;
using Options = CommandManager::Options;

View File

@ -143,6 +143,7 @@ struct Handler : CommandHandlerObject {
void OnNew(const CommandContext &context )
{
(void)context;// Compiler food
CreateNewAudacityProject();
}

View File

@ -575,6 +575,7 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
MenuTable::BaseItemPtr LabelEditMenus( AudacityProject &project )
{
(void)project;//Compiler food
using namespace MenuTable;
using Options = CommandManager::Options;

View File

@ -46,6 +46,7 @@ float VelocitySliderHandle::GetValue()
UIHandle::Result VelocitySliderHandle::SetValue
(AudacityProject *pProject, float newValue)
{
(void)pProject;//Compiler food
auto pTrack = GetNoteTrack();
if (pTrack) {

View File

@ -43,6 +43,7 @@ float GainSliderHandle::GetValue()
UIHandle::Result GainSliderHandle::SetValue
(AudacityProject *pProject, float newValue)
{
(void)pProject;//Compiler food
auto pTrack = GetWaveTrack();
if (pTrack) {
@ -118,6 +119,7 @@ float PanSliderHandle::GetValue()
UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newValue)
{
(void)pProject;//Compiler food
using namespace RefreshCode;
Result result = RefreshNone;
auto pTrack = GetWaveTrack();