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:
Niels Martin Hansen 2011-08-30 00:12:01 +00:00
parent a36695d9fd
commit c2ca659925
1 changed files with 7 additions and 3 deletions

View File

@ -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
void FrameMain::SetAccelerators() {
@ -1326,9 +1333,6 @@ void FrameMain::SetAccelerators() {
}
// 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());
// Set table