Fix the code to compile on G++ 4.7
This commit is contained in:
parent
5c11315631
commit
286240eff4
4 changed files with 54 additions and 36 deletions
|
@ -56,14 +56,15 @@ public:
|
|||
|
||||
void on_dumper_update()
|
||||
{
|
||||
std::map<std::string, dumper_info> new_dumpers;
|
||||
new_dumpers.clear();
|
||||
std::set<adv_dumper*> dset = adv_dumper::get_dumper_set();
|
||||
for(auto i : dset)
|
||||
update_dumperinfo(new_dumpers, i);
|
||||
runuifun([linked, new_dumpers]() { if(linked) linked->update(new_dumpers); });
|
||||
runuifun([this]() { if(this->linked) this->linked->update(this->new_dumpers); });
|
||||
}
|
||||
private:
|
||||
dumper_menu* linked;
|
||||
std::map<std::string, dumper_info> new_dumpers;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -319,17 +319,18 @@ namespace
|
|||
void controller_autohold_menu::change_type()
|
||||
{
|
||||
enabled_entries = 0;
|
||||
runuifun([&autoholds, &pidxs, our_pid]() {
|
||||
runuifun([this]() {
|
||||
auto limits = get_core_logical_controller_limits();
|
||||
autoholds.resize(limits.second);
|
||||
this->autoholds.resize(limits.second);
|
||||
for(unsigned i = 0; i < limits.second; i++) {
|
||||
pidxs[i] = -1;
|
||||
if(our_pid >= 0)
|
||||
pidxs[i] = controls.button_id(our_pid, i);
|
||||
if(pidxs[i] >= 0)
|
||||
autoholds[i] = (our_pid > 0 && controls.autohold(our_pid, pidxs[i]));
|
||||
this->pidxs[i] = -1;
|
||||
if(this->our_pid >= 0)
|
||||
this->pidxs[i] = controls.button_id(this->our_pid, i);
|
||||
if(this->pidxs[i] >= 0)
|
||||
this->autoholds[i] = (this->our_pid > 0 && controls.autohold(this->our_pid,
|
||||
this->pidxs[i]));
|
||||
else
|
||||
autoholds[i] = false;
|
||||
this->autoholds[i] = false;
|
||||
}
|
||||
});
|
||||
our_pid = controls.lcid_to_pcid(our_lid);
|
||||
|
@ -471,27 +472,27 @@ namespace
|
|||
|
||||
void broadcast_listener::on_sound_unmute(bool unmute) throw()
|
||||
{
|
||||
runuifun([unmute, mainw]() { mainw->menu_check(wxID_AUDIO_ENABLED, unmute); });
|
||||
runuifun([this, unmute]() { this->mainw->menu_check(wxID_AUDIO_ENABLED, unmute); });
|
||||
}
|
||||
|
||||
void broadcast_listener::on_sound_change(const std::string& dev) throw()
|
||||
{
|
||||
runuifun([dev, sounddev]() { if(sounddev) sounddev->update(dev); });
|
||||
runuifun([this, dev]() { if(this->sounddev) this->sounddev->update(dev); });
|
||||
}
|
||||
|
||||
void broadcast_listener::on_mode_change(bool readonly) throw()
|
||||
{
|
||||
runuifun([readonly, mainw]() { mainw->menu_check(wxID_READONLY_MODE, readonly); });
|
||||
runuifun([this, readonly]() { this->mainw->menu_check(wxID_READONLY_MODE, readonly); });
|
||||
}
|
||||
|
||||
void broadcast_listener::on_autohold_update(unsigned pid, unsigned ctrlnum, bool newstate)
|
||||
{
|
||||
runuifun([pid, ctrlnum, newstate, ahmenu]() { ahmenu->update(pid, ctrlnum, newstate); });
|
||||
runuifun([this, pid, ctrlnum, newstate]() { this->ahmenu->update(pid, ctrlnum, newstate); });
|
||||
}
|
||||
|
||||
void broadcast_listener::on_autohold_reconfigure()
|
||||
{
|
||||
runuifun([ahmenu]() { ahmenu->reconfigure(); });
|
||||
runuifun([this]() { this->ahmenu->reconfigure(); });
|
||||
}
|
||||
|
||||
path_setting moviepath_setting("moviepath");
|
||||
|
|
|
@ -356,32 +356,48 @@ void wxwindow_memorysearch::update()
|
|||
{
|
||||
std::string ret;
|
||||
uint64_t addr_count;
|
||||
runemufn([msearch, &ret, &addr_count, typecode, hexmode, &addresses]() {
|
||||
addr_count = msearch->get_candidate_count();
|
||||
runemufn([this, &ret, &addr_count]() {
|
||||
addr_count = this->msearch->get_candidate_count();
|
||||
if(addr_count <= CANDIDATE_LIMIT) {
|
||||
addresses.clear();
|
||||
std::list<uint64_t> addrs = msearch->get_candidates();
|
||||
this->addresses.clear();
|
||||
std::list<uint64_t> addrs = this->msearch->get_candidates();
|
||||
long j = 0;
|
||||
for(auto i : addrs) {
|
||||
std::ostringstream row;
|
||||
row << hexformat_address(i) << " ";
|
||||
switch(typecode) {
|
||||
case 0: row << format_number_signed(memory_read_byte(i), hexmode); break;
|
||||
case 1: row << format_number_unsigned(memory_read_byte(i), hexmode); break;
|
||||
case 2: row << format_number_signed(memory_read_word(i), hexmode); break;
|
||||
case 3: row << format_number_unsigned(memory_read_word(i), hexmode); break;
|
||||
case 4: row << format_number_signed(memory_read_dword(i), hexmode); break;
|
||||
case 5: row << format_number_unsigned(memory_read_dword(i), hexmode); break;
|
||||
case 6: row << format_number_signed(memory_read_qword(i), hexmode); break;
|
||||
case 7: row << format_number_unsigned(memory_read_qword(i), hexmode); break;
|
||||
switch(this->typecode) {
|
||||
case 0:
|
||||
row << format_number_signed(memory_read_byte(i), this->hexmode);
|
||||
break;
|
||||
case 1:
|
||||
row << format_number_unsigned(memory_read_byte(i), this->hexmode);
|
||||
break;
|
||||
case 2:
|
||||
row << format_number_signed(memory_read_word(i), this->hexmode);
|
||||
break;
|
||||
case 3:
|
||||
row << format_number_unsigned(memory_read_word(i), this->hexmode);
|
||||
break;
|
||||
case 4:
|
||||
row << format_number_signed(memory_read_dword(i), this->hexmode);
|
||||
break;
|
||||
case 5:
|
||||
row << format_number_unsigned(memory_read_dword(i), this->hexmode);
|
||||
break;
|
||||
case 6:
|
||||
row << format_number_signed(memory_read_qword(i), this->hexmode);
|
||||
break;
|
||||
case 7:
|
||||
row << format_number_unsigned(memory_read_qword(i), this->hexmode);
|
||||
break;
|
||||
};
|
||||
row << std::endl;
|
||||
ret = ret + row.str();
|
||||
addresses[j++] = i;
|
||||
this->addresses[j++] = i;
|
||||
}
|
||||
} else {
|
||||
ret = "Too many candidates to display";
|
||||
addresses.clear();
|
||||
this->addresses.clear();
|
||||
}
|
||||
});
|
||||
std::ostringstream x;
|
||||
|
|
|
@ -68,7 +68,8 @@ namespace
|
|||
else {
|
||||
if(pkey == name) {
|
||||
keygrab_active = false;
|
||||
runuifun([pkey]() { report_grab_key(pkey); });
|
||||
std::string tmp = pkey;
|
||||
runuifun([tmp]() { report_grab_key(tmp); });
|
||||
} else
|
||||
pkey = "";
|
||||
}
|
||||
|
@ -1673,9 +1674,8 @@ void wxeditor_esettings_advanced::on_setting_change(const std::string& setting,
|
|||
{
|
||||
if(destruction_underway)
|
||||
return;
|
||||
wxeditor_esettings_advanced* th = this;
|
||||
runuifun([&settings, &values, setting, value, th]() {
|
||||
settings.insert(setting); values[setting] = value; th->_refresh();
|
||||
runuifun([this, setting, value]() {
|
||||
this->settings.insert(setting); this->values[setting] = value; this->_refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1684,8 +1684,8 @@ void wxeditor_esettings_advanced::on_setting_clear(const std::string& setting)
|
|||
if(destruction_underway)
|
||||
return;
|
||||
wxeditor_esettings_advanced* th = this;
|
||||
runuifun([&settings, &values, setting, th]() {
|
||||
settings.insert(setting); values.erase(setting); th->_refresh();
|
||||
runuifun([this, setting]() {
|
||||
this->settings.insert(setting); this->values.erase(setting); this->_refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue