mirror of https://github.com/odrling/Aegisub
Shuffle code around a bit to make it actually compile on other than MSVC. Updates #1333.
Originally committed to SVN as r5574.
This commit is contained in:
parent
a36695d9fd
commit
c2ca659925
|
@ -1291,6 +1291,13 @@ void FrameMain::StatusTimeout(wxString text,int ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Helper for below
|
||||||
|
namespace {
|
||||||
|
struct AcceleratorInvalid {
|
||||||
|
bool operator() (const wxAcceleratorEntry &ac) { return ac.GetKeyCode() == 0; }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Setup accelerator table
|
// Setup accelerator table
|
||||||
void FrameMain::SetAccelerators() {
|
void FrameMain::SetAccelerators() {
|
||||||
|
@ -1326,9 +1333,6 @@ void FrameMain::SetAccelerators() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all invalid accelerators
|
// Remove all invalid accelerators
|
||||||
struct AcceleratorInvalid {
|
|
||||||
bool operator() (const wxAcceleratorEntry &ac) { return ac.GetKeyCode() == 0; }
|
|
||||||
};
|
|
||||||
entry.erase(std::remove_if(entry.begin(), entry.end(), AcceleratorInvalid()), entry.end());
|
entry.erase(std::remove_if(entry.begin(), entry.end(), AcceleratorInvalid()), entry.end());
|
||||||
|
|
||||||
// Set table
|
// Set table
|
||||||
|
|
Loading…
Reference in New Issue