mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Fix many MSVC compiler warnings.
This commit is contained in:
@@ -220,9 +220,9 @@ void VisitItem( AudacityProject &project, MenuTable::BaseItem *pItem )
|
|||||||
else
|
else
|
||||||
if (const auto pSpecial =
|
if (const auto pSpecial =
|
||||||
dynamic_cast<SpecialItem*>( pItem )) {
|
dynamic_cast<SpecialItem*>( pItem )) {
|
||||||
const auto pMenu = manager.CurrentMenu();
|
const auto pCurrentMenu = manager.CurrentMenu();
|
||||||
wxASSERT( pMenu );
|
wxASSERT( pCurrentMenu );
|
||||||
pSpecial->fn( project, *pMenu );
|
pSpecial->fn( project, *pCurrentMenu );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wxASSERT( false );
|
wxASSERT( false );
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#include "widgets/ASlider.h"
|
#include "widgets/ASlider.h"
|
||||||
#include "widgets/wxPanelWrapper.h"
|
#include "widgets/wxPanelWrapper.h"
|
||||||
|
|
||||||
class TrackListEvent;
|
struct TrackListEvent;
|
||||||
|
|
||||||
// containment hierarchy:
|
// containment hierarchy:
|
||||||
// MixerBoardFrame -> MixerBoard -> MixerBoardScrolledWindow -> MixerTrackCluster(s)
|
// MixerBoardFrame -> MixerBoard -> MixerBoardScrolledWindow -> MixerTrackCluster(s)
|
||||||
|
@@ -36,7 +36,7 @@ void SelectionState::SelectTrackLength
|
|||||||
void SelectionState::SelectTrack(
|
void SelectionState::SelectTrack(
|
||||||
Track &track, bool selected, bool updateLastPicked )
|
Track &track, bool selected, bool updateLastPicked )
|
||||||
{
|
{
|
||||||
bool wasCorrect = (selected == track.GetSelected());
|
//bool wasCorrect = (selected == track.GetSelected());
|
||||||
|
|
||||||
for (auto channel : TrackList::Channels(&track))
|
for (auto channel : TrackList::Channels(&track))
|
||||||
channel->SetSelected(selected);
|
channel->SetSelected(selected);
|
||||||
|
@@ -33,7 +33,7 @@ class LabelTrack;
|
|||||||
class SpectrumAnalyst;
|
class SpectrumAnalyst;
|
||||||
class Track;
|
class Track;
|
||||||
class TrackList;
|
class TrackList;
|
||||||
class TrackListEvent;
|
struct TrackListEvent;
|
||||||
class TrackPanel;
|
class TrackPanel;
|
||||||
class TrackArtist;
|
class TrackArtist;
|
||||||
class Ruler;
|
class Ruler;
|
||||||
|
@@ -570,7 +570,8 @@ namespace MenuTable {
|
|||||||
std::forward<Args>(args)... ); }
|
std::forward<Args>(args)... ); }
|
||||||
inline BaseItemPtr Items(
|
inline BaseItemPtr Items(
|
||||||
const wxString &title, BaseItemPtrs &&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
|
// Menu items can be constructed two ways, as for group items
|
||||||
// Items will appear in a main toolbar menu or in a sub-menu
|
// Items will appear in a main toolbar menu or in a sub-menu
|
||||||
|
@@ -218,7 +218,7 @@ void DoUndo(AudacityProject &project)
|
|||||||
{
|
{
|
||||||
auto trackPanel = project.GetTrackPanel();
|
auto trackPanel = project.GetTrackPanel();
|
||||||
auto &undoManager = *project.GetUndoManager();
|
auto &undoManager = *project.GetUndoManager();
|
||||||
auto historyWindow = project.GetHistoryWindow();
|
//auto historyWindow = project.GetHistoryWindow();
|
||||||
|
|
||||||
if (!project.UndoAvailable()) {
|
if (!project.UndoAvailable()) {
|
||||||
AudacityMessageBox(_("Nothing to undo"));
|
AudacityMessageBox(_("Nothing to undo"));
|
||||||
@@ -254,7 +254,7 @@ void OnRedo(const CommandContext &context)
|
|||||||
auto &project = context.project;
|
auto &project = context.project;
|
||||||
auto trackPanel = project.GetTrackPanel();
|
auto trackPanel = project.GetTrackPanel();
|
||||||
auto &undoManager = *project.GetUndoManager();
|
auto &undoManager = *project.GetUndoManager();
|
||||||
auto historyWindow = project.GetHistoryWindow();
|
//auto historyWindow = project.GetHistoryWindow();
|
||||||
|
|
||||||
if (!project.RedoAvailable()) {
|
if (!project.RedoAvailable()) {
|
||||||
AudacityMessageBox(_("Nothing to redo"));
|
AudacityMessageBox(_("Nothing to redo"));
|
||||||
@@ -282,7 +282,7 @@ void OnCut(const CommandContext &context)
|
|||||||
auto trackPanel = project.GetTrackPanel();
|
auto trackPanel = project.GetTrackPanel();
|
||||||
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
||||||
auto ruler = project.GetRulerPanel();
|
auto ruler = project.GetRulerPanel();
|
||||||
auto historyWindow = project.GetHistoryWindow();
|
//auto historyWindow = project.GetHistoryWindow();
|
||||||
|
|
||||||
// This doesn't handle cutting labels, it handles
|
// This doesn't handle cutting labels, it handles
|
||||||
// cutting the _text_ inside of labels, i.e. if you're
|
// 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 tracks = project.GetTracks();
|
||||||
auto trackPanel = project.GetTrackPanel();
|
auto trackPanel = project.GetTrackPanel();
|
||||||
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
||||||
auto historyWindow = project.GetHistoryWindow();
|
//auto historyWindow = project.GetHistoryWindow();
|
||||||
|
|
||||||
for (auto lt : tracks->Selected< LabelTrack >()) {
|
for (auto lt : tracks->Selected< LabelTrack >()) {
|
||||||
if (lt->CopySelectedText()) {
|
if (lt->CopySelectedText()) {
|
||||||
@@ -723,7 +723,7 @@ void OnSplitCut(const CommandContext &context)
|
|||||||
auto &project = context.project;
|
auto &project = context.project;
|
||||||
auto tracks = project.GetTracks();
|
auto tracks = project.GetTracks();
|
||||||
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
auto &selectedRegion = project.GetViewInfo().selectedRegion;
|
||||||
auto historyWindow = project.GetHistoryWindow();
|
//auto historyWindow = project.GetHistoryWindow();
|
||||||
|
|
||||||
AudacityProject::ClearClipboard();
|
AudacityProject::ClearClipboard();
|
||||||
|
|
||||||
@@ -1080,6 +1080,7 @@ MenuTable::BaseItemPtr LabelEditMenus( AudacityProject &project );
|
|||||||
|
|
||||||
MenuTable::BaseItemPtr EditMenu( AudacityProject &project )
|
MenuTable::BaseItemPtr EditMenu( AudacityProject &project )
|
||||||
{
|
{
|
||||||
|
(void)project;// Compiler food
|
||||||
using namespace MenuTable;
|
using namespace MenuTable;
|
||||||
using Options = CommandManager::Options;
|
using Options = CommandManager::Options;
|
||||||
|
|
||||||
|
@@ -143,6 +143,7 @@ struct Handler : CommandHandlerObject {
|
|||||||
|
|
||||||
void OnNew(const CommandContext &context )
|
void OnNew(const CommandContext &context )
|
||||||
{
|
{
|
||||||
|
(void)context;// Compiler food
|
||||||
CreateNewAudacityProject();
|
CreateNewAudacityProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -575,6 +575,7 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
|
|||||||
|
|
||||||
MenuTable::BaseItemPtr LabelEditMenus( AudacityProject &project )
|
MenuTable::BaseItemPtr LabelEditMenus( AudacityProject &project )
|
||||||
{
|
{
|
||||||
|
(void)project;//Compiler food
|
||||||
using namespace MenuTable;
|
using namespace MenuTable;
|
||||||
using Options = CommandManager::Options;
|
using Options = CommandManager::Options;
|
||||||
|
|
||||||
|
@@ -46,6 +46,7 @@ float VelocitySliderHandle::GetValue()
|
|||||||
UIHandle::Result VelocitySliderHandle::SetValue
|
UIHandle::Result VelocitySliderHandle::SetValue
|
||||||
(AudacityProject *pProject, float newValue)
|
(AudacityProject *pProject, float newValue)
|
||||||
{
|
{
|
||||||
|
(void)pProject;//Compiler food
|
||||||
auto pTrack = GetNoteTrack();
|
auto pTrack = GetNoteTrack();
|
||||||
|
|
||||||
if (pTrack) {
|
if (pTrack) {
|
||||||
|
@@ -43,6 +43,7 @@ float GainSliderHandle::GetValue()
|
|||||||
UIHandle::Result GainSliderHandle::SetValue
|
UIHandle::Result GainSliderHandle::SetValue
|
||||||
(AudacityProject *pProject, float newValue)
|
(AudacityProject *pProject, float newValue)
|
||||||
{
|
{
|
||||||
|
(void)pProject;//Compiler food
|
||||||
auto pTrack = GetWaveTrack();
|
auto pTrack = GetWaveTrack();
|
||||||
|
|
||||||
if (pTrack) {
|
if (pTrack) {
|
||||||
@@ -118,6 +119,7 @@ float PanSliderHandle::GetValue()
|
|||||||
|
|
||||||
UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newValue)
|
UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newValue)
|
||||||
{
|
{
|
||||||
|
(void)pProject;//Compiler food
|
||||||
using namespace RefreshCode;
|
using namespace RefreshCode;
|
||||||
Result result = RefreshNone;
|
Result result = RefreshNone;
|
||||||
auto pTrack = GetWaveTrack();
|
auto pTrack = GetWaveTrack();
|
||||||
|
Reference in New Issue
Block a user