Silence a pile of /W4 warnings

Originally committed to SVN as r6001.
This commit is contained in:
Thomas Goyne 2011-12-22 21:09:31 +00:00
parent c36cd32127
commit 34a87b1c1e
39 changed files with 133 additions and 147 deletions

View File

@ -139,7 +139,7 @@ private:
class Null
{
public:
bool operator == (const Null& trivial) const { return true; }
bool operator == (const Null&) const { return true; }
};
} // end namespace

View File

@ -55,12 +55,12 @@ private:
class UnknownElement::ConstCastVisitor : public ConstVisitor
{
virtual void Visit(const Array& array) {}
virtual void Visit(const Object& object) {}
virtual void Visit(const Number& number) {}
virtual void Visit(const String& string) {}
virtual void Visit(const Boolean& boolean) {}
virtual void Visit(const Null& null) {}
virtual void Visit(const Array&) {}
virtual void Visit(const Object&) {}
virtual void Visit(const Number&) {}
virtual void Visit(const String&) {}
virtual void Visit(const Boolean&) {}
virtual void Visit(const Null&) {}
};
template <typename ElementTypeT>
@ -75,12 +75,12 @@ public:
class UnknownElement::CastVisitor : public Visitor
{
virtual void Visit(Array& array) {}
virtual void Visit(Object& object) {}
virtual void Visit(Number& number) {}
virtual void Visit(String& string) {}
virtual void Visit(Boolean& boolean) {}
virtual void Visit(Null& null) {}
virtual void Visit(Array&) {}
virtual void Visit(Object&) {}
virtual void Visit(Number&) {}
virtual void Visit(String&) {}
virtual void Visit(Boolean&) {}
virtual void Visit(Null&) {}
};
template <typename ElementTypeT>

View File

@ -82,11 +82,11 @@ public:
virtual Colour GetColour() const { throw TypeError("colour"); }
virtual bool GetBool() const { throw TypeError("bool"); }
virtual void SetString(const std::string val) { throw TypeError("string", " set "); }
virtual void SetInt(const int64_t val) { throw TypeError("int", " set "); }
virtual void SetDouble(const double val) { throw TypeError("double", " set "); }
virtual void SetColour(const Colour val) { throw TypeError("colour", " set "); }
virtual void SetBool(const bool val) { throw TypeError("bool", " set "); }
virtual void SetString(const std::string) { throw TypeError("string", " set "); }
virtual void SetInt(const int64_t) { throw TypeError("int", " set "); }
virtual void SetDouble(const double) { throw TypeError("double", " set "); }
virtual void SetColour(const Colour) { throw TypeError("colour", " set "); }
virtual void SetBool(const bool) { throw TypeError("bool", " set "); }
virtual std::string GetDefaultString() const { throw TypeError("string"); }
virtual int64_t GetDefaultInt() const { throw TypeError("int"); }
@ -101,11 +101,11 @@ public:
virtual std::vector<Colour> const& GetListColour() const { throw ListTypeError("colour"); }
virtual std::vector<bool> const& GetListBool() const { throw ListTypeError("string"); }
virtual void SetListString(const std::vector<std::string>& val) { throw ListTypeError("string", " set "); }
virtual void SetListInt(const std::vector<int64_t>& val) { throw ListTypeError("int", " set "); }
virtual void SetListDouble(const std::vector<double>& val) { throw ListTypeError("double", " set "); }
virtual void SetListColour(const std::vector<Colour>& val) { throw ListTypeError("colour", " set "); }
virtual void SetListBool(const std::vector<bool>& val) { throw ListTypeError("string", " set "); }
virtual void SetListString(const std::vector<std::string>&) { throw ListTypeError("string", " set "); }
virtual void SetListInt(const std::vector<int64_t>&) { throw ListTypeError("int", " set "); }
virtual void SetListDouble(const std::vector<double>&) { throw ListTypeError("double", " set "); }
virtual void SetListColour(const std::vector<Colour>&) { throw ListTypeError("colour", " set "); }
virtual void SetListBool(const std::vector<bool>&) { throw ListTypeError("string", " set "); }
virtual std::vector<std::string> const& GetDefaultListString() const { throw ListTypeError("string"); }
virtual std::vector<int64_t> const& GetDefaultListInt() const { throw ListTypeError("int"); }

View File

@ -51,7 +51,6 @@
class AssStyle;
/// DOCME
/// @class AssStyleStorage
/// @brief DOCME

View File

@ -164,7 +164,7 @@ AudioController::~AudioController()
}
void AudioController::OnPlaybackTimer(wxTimerEvent &event)
void AudioController::OnPlaybackTimer(wxTimerEvent &)
{
int64_t pos = player->GetCurrentPosition();
@ -183,14 +183,14 @@ void AudioController::OnPlaybackTimer(wxTimerEvent &event)
#ifdef wxHAS_POWER_EVENTS
void AudioController::OnComputerSuspending(wxPowerEvent &event)
void AudioController::OnComputerSuspending(wxPowerEvent &)
{
Stop();
player->CloseStream();
}
void AudioController::OnComputerResuming(wxPowerEvent &event)
void AudioController::OnComputerResuming(wxPowerEvent &)
{
if (provider)
player->OpenStream();

View File

@ -859,7 +859,7 @@ BEGIN_EVENT_TABLE(AudioDisplay, wxWindow)
END_EVENT_TABLE();
void AudioDisplay::OnPaint(wxPaintEvent& event)
void AudioDisplay::OnPaint(wxPaintEvent&)
{
wxAutoBufferedPaintDC dc(this);
@ -1200,7 +1200,7 @@ void AudioDisplay::OnKeyDown(wxKeyEvent& event)
}
void AudioDisplay::OnSize(wxSizeEvent &event)
void AudioDisplay::OnSize(wxSizeEvent &)
{
// We changed size, update the sub-controls' internal data and redraw
wxSize size = GetClientSize();
@ -1219,7 +1219,7 @@ void AudioDisplay::OnSize(wxSizeEvent &event)
}
void AudioDisplay::OnFocus(wxFocusEvent &event)
void AudioDisplay::OnFocus(wxFocusEvent &)
{
// The scrollbar indicates focus so repaint that
RefreshRect(scrollbar->GetBounds(), false);

View File

@ -152,7 +152,7 @@ void AudioKaraoke::SetEnabled(bool en) {
}
}
void AudioKaraoke::OnPaint(wxPaintEvent &evt) {
void AudioKaraoke::OnPaint(wxPaintEvent &) {
int w, h;
split_area->GetClientSize(&w, &h);

View File

@ -83,7 +83,7 @@ BEGIN_EVENT_TABLE(AudioPlayer, wxEvtHandler)
EVT_COMMAND (1000, wxEVT_STOP_AUDIO, AudioPlayer::OnStopAudio)
END_EVENT_TABLE()
void AudioPlayer::OnStopAudio(wxCommandEvent &event) {
void AudioPlayer::OnStopAudio(wxCommandEvent &) {
Stop(false);
}

View File

@ -62,7 +62,7 @@ DummyAudioProvider::~DummyAudioProvider() {
/// @param start
/// @param count
///
void DummyAudioProvider::GetAudio(void *buf, int64_t start, int64_t count) const {
void DummyAudioProvider::GetAudio(void *buf, int64_t, int64_t count) const {
short *workbuf = (short*)buf;
if (noise) {

View File

@ -171,7 +171,7 @@ namespace {
};
#else
struct LuaStackcheck {
void check_stack(int additional) { }
void check_stack(int) { }
void dump() { }
LuaStackcheck(lua_State*) { }
};

View File

@ -100,8 +100,8 @@ BaseGrid::BaseGrid(wxWindow* parent, agi::Context *context, const wxSize& size,
, batch_active_line_changed(false)
, seek_listener(context->videoController->AddSeekListener(std::tr1::bind(&BaseGrid::Refresh, this, false, (wxRect*)NULL)))
, context_menu(0)
, context(context)
, yPos(0)
, context(context)
{
scrollBar->SetScrollbar(0,10,100,10);
@ -429,7 +429,7 @@ wxArrayInt BaseGrid::GetSelection() const {
}
void BaseGrid::OnPaint(wxPaintEvent &event) {
void BaseGrid::OnPaint(wxPaintEvent &) {
// Get size and pos
wxSize cs = GetClientSize();
cs.SetWidth(cs.GetWidth() - scrollBar->GetSize().GetWidth());
@ -649,7 +649,7 @@ void BaseGrid::GetRowStrings(int row, AssDialogue *line, bool *paint_columns, wx
}
}
void BaseGrid::OnSize(wxSizeEvent &event) {
void BaseGrid::OnSize(wxSizeEvent &) {
AdjustScrollbar();
SetColumnWidths();
Refresh(false);

View File

@ -205,7 +205,7 @@ struct app_new_window : public Command {
STR_DISP("New Window")
STR_HELP("Open a new application window.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
RestartAegisub();
}
};
@ -235,11 +235,11 @@ struct app_toggle_global_hotkeys : public Command {
STR_HELP("Toggle global hotkey overrides.")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Medusa Timing Hotkeys")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
agi::OptionValue *opt = OPT_SET("Audio/Medusa Timing Hotkeys");
opt->SetBool(!opt->GetBool());
}
@ -252,7 +252,7 @@ struct app_updates : public Command {
STR_DISP("Check for Updates")
STR_HELP("Check to see if there is a new version of Aegisub available.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
PerformVersionCheck(true);
}
};

View File

@ -168,11 +168,11 @@ struct audio_view_spectrum : public Command {
STR_HELP("Display audio as a frequency-power spectrograph.")
CMD_TYPE(COMMAND_RADIO)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Spectrum")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Audio/Spectrum")->SetBool(true);
}
};
@ -186,11 +186,11 @@ struct audio_view_waveform : public Command {
STR_HELP("Display audio as a linear amplitude graph.")
CMD_TYPE(COMMAND_RADIO)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return !OPT_GET("Audio/Spectrum")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Audio/Spectrum")->SetBool(false);
}
};
@ -391,11 +391,11 @@ struct audio_autoscroll : public Command {
STR_HELP("Auto scrolls audio display to selected line")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Auto/Scroll")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
toggle("Audio/Auto/Scroll");
}
};
@ -408,11 +408,11 @@ struct audio_autocommit : public Command {
STR_HELP("Automatically commit all changes")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Auto/Commit")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
toggle("Audio/Auto/Commit");
}
};
@ -425,11 +425,11 @@ struct audio_autonext : public Command {
STR_HELP("Auto goes to next line on commit")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Next Line on Commit")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
toggle("Audio/Next Line on Commit");
}
};
@ -442,11 +442,11 @@ struct audio_toggle_spectrum : public Command {
STR_HELP("Spectrum analyzer mode")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Spectrum")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
toggle("Audio/Spectrum");
}
};
@ -459,11 +459,11 @@ struct audio_vertical_link : public Command {
STR_HELP("Link vertical zoom and volume sliders")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Audio/Link")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
toggle("Audio/Link");
}
};

View File

@ -254,7 +254,7 @@ struct edit_line_paste : public Command {
STR_HELP("Paste subtitles.")
CMD_TYPE(COMMAND_VALIDATE)
bool Validate(const agi::Context *c) {
bool Validate(const agi::Context *) {
if (wxTheClipboard->Open()) {
bool can_paste = wxTheClipboard->IsSupported(wxDF_TEXT);
wxTheClipboard->Close();

View File

@ -86,7 +86,7 @@ struct grid_tag_cycle_hiding : public Command {
STR_DISP("Cycle Tag Hiding")
STR_HELP("Cycle through tag hiding modes.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
int tagMode = OPT_GET("Subtitle/Grid/Hide Overrides")->GetInt();
// Cycle to next
@ -113,11 +113,11 @@ struct grid_tags_hide : public Command {
STR_HELP("Hide override tags in the subtitle grid.")
CMD_TYPE(COMMAND_RADIO)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Subtitle/Grid/Hide Overrides")->GetInt() == 2;
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(2);
}
};
@ -131,11 +131,11 @@ struct grid_tags_show : public Command {
STR_HELP("Show full override tags in the subtitle grid.")
CMD_TYPE(COMMAND_RADIO)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Subtitle/Grid/Hide Overrides")->GetInt() == 0;
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(0);
}
};
@ -149,11 +149,11 @@ struct grid_tags_simplify : public Command {
STR_HELP("Replace override tags in the subtitle grid with a simplified placeholder.")
CMD_TYPE(COMMAND_RADIO)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Subtitle/Grid/Hide Overrides")->GetInt() == 1;
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(1);
}
};

View File

@ -84,7 +84,7 @@ struct help_contents : public Command {
STR_DISP("Contents")
STR_HELP("Help topics.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
HelpButton::OpenPage("Main");
}
};
@ -97,7 +97,7 @@ struct help_files : public Command {
STR_DISP("All Files")
STR_HELP("Resource files.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
char *shared_path = agi::util::OSX_GetBundleSharedSupportDirectory();
wxString help_path = wxString::Format("%s/doc", wxString(shared_path, wxConvUTF8));
agi::util::OSX_OpenLocation(help_path.c_str());
@ -113,7 +113,7 @@ struct help_forums : public Command {
STR_DISP("Forums")
STR_HELP("Visit Aegisub's forums.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
AegisubApp::OpenURL("http://forum.aegisub.org/");
}
};
@ -126,7 +126,7 @@ struct help_irc : public Command {
STR_DISP("IRC Channel")
STR_HELP("Visit Aegisub's official IRC channel.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
AegisubApp::OpenURL("irc://irc.rizon.net/aegisub");
}
};
@ -138,7 +138,7 @@ struct help_video : public Command {
STR_DISP("Visual Typesetting")
STR_HELP("Open the manual page for Visual Typesetting.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
HelpButton::OpenPage("Visual Typesetting");
}
};
@ -150,7 +150,7 @@ struct help_website : public Command {
STR_DISP("Website")
STR_HELP("Visit Aegisub's official website.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
AegisubApp::OpenURL("http://www.aegisub.org/");
}
};

View File

@ -72,7 +72,7 @@ struct tool_assdraw : public Command {
STR_DISP("ASSDraw3")
STR_HELP("Launch ASSDraw3 tool for vector drawing.")
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
wxExecute("\"" + StandardPaths::DecodePath("?data/ASSDraw3.exe") + "\"");
}
};

View File

@ -622,11 +622,11 @@ struct video_opt_autoscroll : public Command {
STR_HELP("Toggle autoscroll of video")
CMD_TYPE(COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Video/Subtitle Sync")->GetBool();
}
void operator()(agi::Context *c) {
void operator()(agi::Context *) {
OPT_SET("Video/Subtitle Sync")->SetBool(!OPT_GET("Video/Subtitle Sync")->GetBool());
}
};
@ -663,7 +663,7 @@ struct video_show_overscan : public validator_video_loaded {
STR_HELP("Show a mask over the video, indicating areas that might get cropped off by overscan on televisions.")
CMD_TYPE(COMMAND_VALIDATE | COMMAND_TOGGLE)
bool IsActive(const agi::Context *c) {
bool IsActive(const agi::Context *) {
return OPT_GET("Video/Overscan Mask")->GetBool();
}

View File

@ -197,7 +197,7 @@ END_EVENT_TABLE()
/// @param event
/// @return
///
void DialogAttachments::OnAttachFont(wxCommandEvent &event) {
void DialogAttachments::OnAttachFont(wxCommandEvent &) {
// Pick files
wxArrayString filenames;
wxArrayString paths;
@ -235,7 +235,7 @@ void DialogAttachments::OnAttachFont(wxCommandEvent &event) {
/// @param event
/// @return
///
void DialogAttachments::OnAttachGraphics(wxCommandEvent &event) {
void DialogAttachments::OnAttachGraphics(wxCommandEvent &) {
// Pick files
wxArrayString filenames;
wxArrayString paths;
@ -273,7 +273,7 @@ void DialogAttachments::OnAttachGraphics(wxCommandEvent &event) {
/// @param event
/// @return
///
void DialogAttachments::OnExtract(wxCommandEvent &event) {
void DialogAttachments::OnExtract(wxCommandEvent &) {
// Check if there's a selection
int i = listView->GetFirstSelected();
@ -308,7 +308,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &event) {
/// @brief Delete
/// @param event
///
void DialogAttachments::OnDelete(wxCommandEvent &event) {
void DialogAttachments::OnDelete(wxCommandEvent &) {
// Loop through items in list
int i = listView->GetFirstSelected();
while (i != -1) {
@ -327,7 +327,7 @@ void DialogAttachments::OnDelete(wxCommandEvent &event) {
/// @brief List selection changed
/// @param event
///
void DialogAttachments::OnListClick(wxListEvent &event) {
void DialogAttachments::OnListClick(wxListEvent &) {
// Check if any is selected
bool hasSel = listView->GetFirstSelected() != -1;

View File

@ -314,7 +314,7 @@ void ColorPickerSpectrum::SetBackground(wxBitmap *new_background, bool force)
wxDEFINE_EVENT(EVT_SPECTRUM_CHANGE, wxCommandEvent);
void ColorPickerSpectrum::OnPaint(wxPaintEvent &evt)
void ColorPickerSpectrum::OnPaint(wxPaintEvent &)
{
if (!background) return;
@ -494,7 +494,7 @@ void ColorPickerRecent::OnClick(wxMouseEvent &evt)
}
}
void ColorPickerRecent::OnPaint(wxPaintEvent &evt)
void ColorPickerRecent::OnPaint(wxPaintEvent &)
{
wxPaintDC pdc(this);
PrepareDC(pdc);
@ -523,7 +523,7 @@ void ColorPickerRecent::OnPaint(wxPaintEvent &evt)
pdc.DrawBitmap(background, 0, 0, false);
}
void ColorPickerRecent::OnSize(wxSizeEvent &evt)
void ColorPickerRecent::OnSize(wxSizeEvent &)
{
background_valid = false;
Refresh();
@ -578,7 +578,7 @@ void ColorPickerScreenDropper::OnMouse(wxMouseEvent &evt)
}
}
void ColorPickerScreenDropper::OnPaint(wxPaintEvent &evt)
void ColorPickerScreenDropper::OnPaint(wxPaintEvent &)
{
wxPaintDC pdc(this);
@ -1129,14 +1129,14 @@ wxBitmap *DialogColorPicker::MakeSVSpectrum()
return hsv_spectrum = new wxBitmap(spectrum_image);
}
void DialogColorPicker::OnChangeMode(wxCommandEvent &evt)
void DialogColorPicker::OnChangeMode(wxCommandEvent &)
{
spectrum_dirty = true;
OPT_SET("Tool/Colour Picker/Mode")->SetInt(colorspace_choice->GetSelection());
UpdateSpectrumDisplay();
}
void DialogColorPicker::OnSpectrumChange(wxCommandEvent &evt)
void DialogColorPicker::OnSpectrumChange(wxCommandEvent &)
{
int i = colorspace_choice->GetSelection();
switch (i) {

View File

@ -216,8 +216,7 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
UpdateLengthDisplay();
// Layout
main_sizer->SetSizeHints(this);
SetSizer(main_sizer);
SetSizerAndFit(main_sizer);
CenterOnParent();
}
@ -242,7 +241,7 @@ END_EVENT_TABLE()
/// @brief DOCME
/// @param evt
///
void DialogDummyVideo::OnResolutionShortcut(wxCommandEvent &evt)
void DialogDummyVideo::OnResolutionShortcut(wxCommandEvent &)
{
int rs = resolution_shortcuts->GetSelection();
width->ChangeValue(wxString::Format("%d", resolutions[rs].width));
@ -254,7 +253,7 @@ void DialogDummyVideo::OnResolutionShortcut(wxCommandEvent &evt)
/// @brief DOCME
/// @param evt
///
void DialogDummyVideo::OnFpsChange(wxCommandEvent &evt)
void DialogDummyVideo::OnFpsChange(wxCommandEvent &)
{
UpdateLengthDisplay();
}
@ -264,7 +263,7 @@ void DialogDummyVideo::OnFpsChange(wxCommandEvent &evt)
/// @brief DOCME
/// @param evt
///
void DialogDummyVideo::OnLengthSpin(wxSpinEvent &evt)
void DialogDummyVideo::OnLengthSpin(wxSpinEvent &)
{
UpdateLengthDisplay();
}
@ -274,7 +273,7 @@ void DialogDummyVideo::OnLengthSpin(wxSpinEvent &evt)
/// @brief DOCME
/// @param evt
///
void DialogDummyVideo::OnLengthChange(wxCommandEvent &evt)
void DialogDummyVideo::OnLengthChange(wxCommandEvent &)
{
UpdateLengthDisplay();
}

View File

@ -193,7 +193,7 @@ int DrawBoxedText(wxDC &dc, const wxString &txt, int x, int y)
}
}
void KaraokeLineMatchDisplay::OnPaint(wxPaintEvent &event)
void KaraokeLineMatchDisplay::OnPaint(wxPaintEvent &)
{
wxPaintDC dc(this);
@ -731,7 +731,7 @@ BEGIN_EVENT_TABLE(DialogKanjiTimer,wxDialog)
EVT_TEXT_ENTER(TEXT_DEST,DialogKanjiTimer::OnKeyEnter)
END_EVENT_TABLE()
void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
void DialogKanjiTimer::OnClose(wxCommandEvent &) {
OPT_SET("Tool/Kanji Timer/Interpolation")->SetBool(Interpolate->IsChecked());
for (size_t i = 0; i < LinesToChange.size(); ++i) {
@ -745,7 +745,7 @@ void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
Close();
}
void DialogKanjiTimer::OnStart(wxCommandEvent &event) {
void DialogKanjiTimer::OnStart(wxCommandEvent &) {
if (SourceStyle->GetValue().empty() || DestStyle->GetValue().empty())
wxMessageBox(_("Select source and destination styles first."),_("Error"),wxICON_EXCLAMATION | wxOK);
else if (SourceStyle->GetValue() == DestStyle->GetValue())
@ -758,30 +758,30 @@ void DialogKanjiTimer::OnStart(wxCommandEvent &event) {
LinesToChange.clear();
}
void DialogKanjiTimer::OnLink(wxCommandEvent &event) {
void DialogKanjiTimer::OnLink(wxCommandEvent &) {
if (display->AcceptMatch())
TryAutoMatch();
else
wxBell();
}
void DialogKanjiTimer::OnUnlink(wxCommandEvent &event) {
void DialogKanjiTimer::OnUnlink(wxCommandEvent &) {
if (!display->UndoMatch())
wxBell();
// Don't auto-match here, undoing sets the selection to the undone match
}
void DialogKanjiTimer::OnSkipSource(wxCommandEvent &event) {
void DialogKanjiTimer::OnSkipSource(wxCommandEvent &) {
currentSourceLine = FindNextStyleMatch(currentSourceLine, SourceStyle->GetValue());
ResetForNewLine();
}
void DialogKanjiTimer::OnSkipDest(wxCommandEvent &event) {
void DialogKanjiTimer::OnSkipDest(wxCommandEvent &) {
currentDestinationLine = FindNextStyleMatch(currentDestinationLine, DestStyle->GetValue());
ResetForNewLine();
}
void DialogKanjiTimer::OnGoBack(wxCommandEvent &event) {
void DialogKanjiTimer::OnGoBack(wxCommandEvent &) {
if (LinesToChange.size())
LinesToChange.pop_back(); //If we go back, then take out the modified line we saved.
@ -790,7 +790,7 @@ void DialogKanjiTimer::OnGoBack(wxCommandEvent &event) {
ResetForNewLine();
}
void DialogKanjiTimer::OnAccept(wxCommandEvent &event) {
void DialogKanjiTimer::OnAccept(wxCommandEvent &) {
if (display->GetRemainingSource() > 0)
wxMessageBox(_("Group all of the source text."),_("Error"),wxICON_EXCLAMATION | wxOK);
else {
@ -831,7 +831,7 @@ void DialogKanjiTimer::OnKeyDown(wxKeyEvent &event) {
}
}
void DialogKanjiTimer::OnKeyEnter(wxCommandEvent &event) {
void DialogKanjiTimer::OnKeyEnter(wxCommandEvent &) {
wxCommandEvent evt;
if (display->GetRemainingSource() == 0 && display->GetRemainingDestination() == 0)

View File

@ -192,11 +192,11 @@ void DialogProgress::OnSetProgress(wxThreadEvent &evt) {
gauge->SetValue(mid(0, evt.GetPayload<int>(), 100));
}
void DialogProgress::OnSetIndeterminate(wxThreadEvent &evt) {
void DialogProgress::OnSetIndeterminate(wxThreadEvent &) {
pulse_timer.Start(1000);
}
void DialogProgress::OnComplete(wxThreadEvent &evt) {
void DialogProgress::OnComplete(wxThreadEvent &) {
pulse_timer.Stop();
// Unbind the cancel handler so that the default behavior happens (i.e. the
@ -225,7 +225,7 @@ void DialogProgress::OnLog(wxThreadEvent &evt) {
log_output->SetInsertionPointEnd();
}
void DialogProgress::OnCancel(wxCommandEvent &evt) {
void DialogProgress::OnCancel(wxCommandEvent &) {
ps->Cancel();
cancel_button->Enable(false);
cancel_button->SetLabelText(_("Cancelling..."));

View File

@ -145,7 +145,7 @@ void DialogProperties::AddProperty(wxSizer *sizer, wxString const& label, wxStri
properties.push_back(std::make_pair(property, ctrl));
}
void DialogProperties::OnOK(wxCommandEvent &event) {
void DialogProperties::OnOK(wxCommandEvent &) {
int count = 0;
for (size_t i = 0; i < properties.size(); ++i)
count += SetInfoIfDifferent(properties[i].first, properties[i].second->GetValue());
@ -170,7 +170,7 @@ int DialogProperties::SetInfoIfDifferent(wxString key,wxString value) {
return 0;
}
void DialogProperties::OnSetFromVideo(wxCommandEvent &event) {
void DialogProperties::OnSetFromVideo(wxCommandEvent &) {
ResX->SetValue(wxString::Format("%d", c->videoController->GetWidth()));
ResY->SetValue(wxString::Format("%d", c->videoController->GetHeight()));
}

View File

@ -164,7 +164,7 @@ void DialogResample::ResampleTags (wxString name,int n,AssOverrideParameter *cur
/// @param _curDiag
/// @return
///
void DialogResample::DoResampleTags (wxString name,int n,AssOverrideParameter *curParam,void *_curDiag) {
void DialogResample::DoResampleTags (wxString name,int n,AssOverrideParameter *curParam,void *) {
double resizer = 1.0;
bool isX = false;
bool isY = false;
@ -226,7 +226,7 @@ void DialogResample::DoResampleTags (wxString name,int n,AssOverrideParameter *c
/// @param event
/// @return
///
void DialogResample::OnResample (wxCommandEvent &event) {
void DialogResample::OnResample (wxCommandEvent &) {
int x1,y1;
c->ass->GetResolution(x1,y1);
long x2 = 0;
@ -332,7 +332,7 @@ void DialogResample::OnResample (wxCommandEvent &event) {
/// @brief Get destination resolution from video
/// @param event
///
void DialogResample::OnGetDestRes (wxCommandEvent &event) {
void DialogResample::OnGetDestRes (wxCommandEvent &) {
ResX->SetValue(wxString::Format("%i",c->videoController->GetWidth()));
ResY->SetValue(wxString::Format("%i",c->videoController->GetHeight()));
}
@ -342,7 +342,7 @@ void DialogResample::OnGetDestRes (wxCommandEvent &event) {
/// @brief Symmetrical checkbox clicked
/// @param event
///
void DialogResample::OnSymmetrical (wxCommandEvent &event) {
void DialogResample::OnSymmetrical (wxCommandEvent &) {
bool state = !MarginSymmetrical->IsChecked();
MarginRight->Enable(state);
MarginBottom->Enable(state);

View File

@ -246,7 +246,7 @@ void DialogSearchReplace::FindReplace(int mode) {
/// @brief Find next
/// @param event
///
void DialogSearchReplace::OnFindNext (wxCommandEvent &event) {
void DialogSearchReplace::OnFindNext (wxCommandEvent &) {
FindReplace(0);
}
@ -255,7 +255,7 @@ void DialogSearchReplace::OnFindNext (wxCommandEvent &event) {
/// @brief Replace next
/// @param event
///
void DialogSearchReplace::OnReplaceNext (wxCommandEvent &event) {
void DialogSearchReplace::OnReplaceNext (wxCommandEvent &) {
FindReplace(1);
}
@ -264,7 +264,7 @@ void DialogSearchReplace::OnReplaceNext (wxCommandEvent &event) {
/// @brief Replace all
/// @param event
///
void DialogSearchReplace::OnReplaceAll (wxCommandEvent &event) {
void DialogSearchReplace::OnReplaceAll (wxCommandEvent &) {
FindReplace(2);
}
@ -295,7 +295,7 @@ void DialogSearchReplace::UpdateDropDowns() {
/// @brief DOCME
/// @param event
///
void DialogSearchReplace::OnSetFocus (wxFocusEvent &event) {
void DialogSearchReplace::OnSetFocus (wxFocusEvent &) {
Search.hasFocus = true;
}
@ -303,7 +303,7 @@ void DialogSearchReplace::OnSetFocus (wxFocusEvent &event) {
/// @brief DOCME
/// @param event
///
void DialogSearchReplace::OnKillFocus (wxFocusEvent &event) {
void DialogSearchReplace::OnKillFocus (wxFocusEvent &) {
Search.hasFocus = false;
}

View File

@ -206,7 +206,7 @@ void DialogStyling::OnActivate(wxActivateEvent &) {
style_name->SetFocus();
}
void DialogStyling::OnStyleBoxModified(wxCommandEvent &event) {
void DialogStyling::OnStyleBoxModified(wxCommandEvent &) {
long from, to;
style_name->GetSelection(&from, &to);
wxString prefix = style_name->GetValue().Left(from).Lower();

View File

@ -83,7 +83,7 @@ DialogTextImport::~DialogTextImport()
/// @brief DOCME
/// @param event
///
void DialogTextImport::OnOK(wxCommandEvent &event)
void DialogTextImport::OnOK(wxCommandEvent &)
{
// Set options
OPT_SET("Tool/Import/Text/Actor Separator")->SetString(STD_STR(edit_separator->GetValue()));
@ -92,20 +92,8 @@ void DialogTextImport::OnOK(wxCommandEvent &event)
EndModal(wxID_OK);
}
/// @brief DOCME
/// @param event
///
void DialogTextImport::OnCancel(wxCommandEvent &event)
{
EndModal(wxID_CANCEL);
}
///////////////
// Event table
BEGIN_EVENT_TABLE(DialogTextImport,wxDialog)
EVT_BUTTON(wxID_OK,DialogTextImport::OnOK)
EVT_BUTTON(wxID_CANCEL,DialogTextImport::OnCancel)
END_EVENT_TABLE()

View File

@ -532,13 +532,13 @@ VersionCheckerResultDialog::VersionCheckerResultDialog(const wxString &main_text
}
void VersionCheckerResultDialog::OnCloseButton(wxCommandEvent &evt)
void VersionCheckerResultDialog::OnCloseButton(wxCommandEvent &)
{
Close();
}
void VersionCheckerResultDialog::OnRemindMeLater(wxCommandEvent &evt)
void VersionCheckerResultDialog::OnRemindMeLater(wxCommandEvent &)
{
// In one week
time_t new_next_check_time = wxDateTime::Today().GetTicks() + 7*24*60*60;
@ -548,7 +548,7 @@ void VersionCheckerResultDialog::OnRemindMeLater(wxCommandEvent &evt)
}
void VersionCheckerResultDialog::OnClose(wxCloseEvent &evt)
void VersionCheckerResultDialog::OnClose(wxCloseEvent &)
{
OPT_SET("App/Auto/Check For Updates")->SetBool(automatic_check_checkbox->GetValue());
Destroy();

View File

@ -581,7 +581,7 @@ void FrameMain::OnStatusClear(wxTimerEvent &) {
SetStatusText("",1);
}
void FrameMain::OnAudioOpen(AudioProvider *provider) {
void FrameMain::OnAudioOpen(AudioProvider *) {
SetDisplayMode(-1, 1);
}

View File

@ -84,7 +84,7 @@ public:
hk_map->insert(make_pair(combo.CmdName(), combo));
}
unsigned int GetChildren(wxDataViewItemArray &children) const { return 0; }
unsigned int GetChildren(wxDataViewItemArray &) const { return 0; }
wxDataViewItem GetParent() const { return wxDataViewItem(parent); }
bool IsContainer() const { return false; }
@ -195,7 +195,7 @@ public:
wxDataViewItem GetParent() const { return wxDataViewItem(0); }
bool IsContainer() const { return true; }
bool SetValue(wxVariant const& variant, unsigned int col) { return false; }
bool SetValue(wxVariant const&, unsigned int) { return false; }
void GetValue(wxVariant &variant, unsigned int col) const {
if (col == 1)
variant << wxDataViewIconText(name);
@ -250,8 +250,8 @@ public:
wxDataViewItem GetParent() const { return wxDataViewItem(0); }
bool IsContainer() const { return true; }
bool SetValue(wxVariant const& variant, unsigned int col) { return false; }
void GetValue(wxVariant &variant, unsigned int col) const { }
bool SetValue(wxVariant const&, unsigned int) { return false; }
void GetValue(wxVariant &, unsigned int) const { }
unsigned int GetChildren(wxDataViewItemArray &out) const {
out.reserve(categories.size());

View File

@ -358,7 +358,7 @@ void Interface_Hotkeys::OnUpdateFilter(wxCommandEvent&) {
}
}
void Interface_Hotkeys::OnClearFilter(wxCommandEvent &evt) {
void Interface_Hotkeys::OnClearFilter(wxCommandEvent &) {
quick_search->SetValue("");
}
@ -525,7 +525,7 @@ void Preferences::OnOK(wxCommandEvent &event) {
EndModal(0);
}
void Preferences::OnApply(wxCommandEvent &event) {
void Preferences::OnApply(wxCommandEvent &) {
for (std::map<std::string, wxAny>::iterator cur = pending_changes.begin(); cur != pending_changes.end(); ++cur) {
agi::OptionValue *opt = OPT_SET(cur->first);
switch (opt->GetType()) {

View File

@ -672,7 +672,7 @@ void SubsEditBox::OnEffectChange(wxCommandEvent &) {
SetSelectedRows(&AssDialogue::Effect, Effect->GetValue(), _("effect change"), AssFile::COMMIT_DIAG_META);
}
void SubsEditBox::OnCommentChange(wxCommandEvent &event) {
void SubsEditBox::OnCommentChange(wxCommandEvent &) {
SetSelectedRows(&AssDialogue::Comment, CommentBox->GetValue(), _("comment change"), AssFile::COMMIT_DIAG_META);
}

View File

@ -307,7 +307,7 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target, bool flagModified) {
entryIter before_first = std::find_if(context->ass->Line.begin(), context->ass->Line.end(), cast<AssDialogue*>()); --before_first;
int row = -1;
int deleted = 0;
size_t deleted = 0;
for (entryIter cur = context->ass->Line.begin(); cur != context->ass->Line.end();) {
if (dynamic_cast<AssDialogue*>(*cur) && ++row == target[deleted]) {
cur = context->ass->Line.erase(cur);

View File

@ -259,7 +259,7 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
/// @brief Mouse event
/// @param event
void TimeEdit::OnContextMenu(wxContextMenuEvent &event) {
void TimeEdit::OnContextMenu(wxContextMenuEvent &) {
if (!byFrame && OPT_GET("Subtitle/Time Edit/Insert Mode")->GetBool()) {
wxMenu menu;
menu.Append(Time_Edit_Copy,_("&Copy"));

View File

@ -76,7 +76,7 @@ wxObject* NumValidator::Clone() const {
return new NumValidator(*this);
}
bool NumValidator::Validate(wxWindow* parent) {
bool NumValidator::Validate(wxWindow*) {
wxTextCtrl *ctrl = (wxTextCtrl*) GetWindow();
wxString value = ctrl->GetValue();

View File

@ -162,7 +162,7 @@ void VideoSlider::OnKeyDown(wxKeyEvent &event) {
}
}
void VideoSlider::OnPaint(wxPaintEvent &event) {
void VideoSlider::OnPaint(wxPaintEvent &) {
wxPaintDC dc(this);
DrawImage(dc);
}
@ -259,6 +259,6 @@ void VideoSlider::DrawImage(wxDC &destdc) {
destdc.Blit(0,0,w,h,&dc,0,0);
}
void VideoSlider::OnFocus(wxFocusEvent &event) {
void VideoSlider::OnFocus(wxFocusEvent &) {
Refresh(false);
}

View File

@ -78,7 +78,7 @@ class VideoSlider: public wxWindow {
void OnKeyDown(wxKeyEvent &event);
void OnPaint(wxPaintEvent &event);
void OnFocus(wxFocusEvent &event);
void OnEraseBackground(wxEraseEvent &event) {}
void OnEraseBackground(wxEraseEvent &) {}
public:
VideoSlider(wxWindow* parent, agi::Context *c);

View File

@ -70,7 +70,7 @@ class VisualToolBase : protected SelectionListener<AssDialogue> {
// SubtitleSelectionListener implementation
void OnActiveLineChanged(AssDialogue *new_line);
void OnSelectedSetChanged(const Selection &lines_added, const Selection &lines_removed) { }
void OnSelectedSetChanged(const Selection &, const Selection &) { }
// Below here are the virtuals that must be implemented
@ -153,7 +153,7 @@ public:
virtual void OnMouseEvent(wxMouseEvent &event)=0;
virtual void Draw()=0;
virtual void SetDisplayArea(int x, int y, int w, int h);
virtual void SetToolbar(wxToolBar *tb) { }
virtual void SetToolbar(wxToolBar *) { }
virtual ~VisualToolBase();
};