mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 03:33:56 +00:00
some refactoring with optional_function
- wrapped std::function into utils::optional_function -- cleaned the code accordingly in windows_emulator - using the 'emulator'/'windows_emulator' dependency implies the emulator_common as well.
This commit is contained in:
@@ -1141,30 +1141,3 @@ void windows_emulator::restore_snapshot()
|
||||
this->process_.deserialize(deserializer);
|
||||
// this->process_ = *this->process_snapshot_;
|
||||
}
|
||||
|
||||
void windows_emulator::on_stdout(const std::string_view data) const
|
||||
{
|
||||
if (this->callbacks_.stdout_callback)
|
||||
{
|
||||
this->callbacks_.stdout_callback(data);
|
||||
}
|
||||
}
|
||||
|
||||
void windows_emulator::on_inline_syscall(uint32_t syscall_id, const x64_emulator::pointer_type address,
|
||||
const std::string_view mod_name, const std::string_view name)
|
||||
{
|
||||
if (this->callbacks_.inline_syscall)
|
||||
{
|
||||
this->callbacks_.inline_syscall(syscall_id, address, mod_name, name);
|
||||
}
|
||||
}
|
||||
|
||||
void windows_emulator::on_outofline_syscall(uint32_t syscall_id, x64_emulator::pointer_type address,
|
||||
std::string_view mod_name, std::string_view syscall_name,
|
||||
x64_emulator::pointer_type prev_address, std::string_view prev_mod_name)
|
||||
{
|
||||
if (this->callbacks_.outofline_syscall)
|
||||
{
|
||||
this->callbacks_.outofline_syscall(syscall_id, address, mod_name, syscall_name, prev_address, prev_mod_name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user