mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
rename keycode, mousecode enumerations
This commit is contained in:
parent
9843a1fc27
commit
881edb7b28
22 changed files with 160 additions and 154 deletions
|
|
@ -26,11 +26,11 @@ namespace util {
|
|||
nextid = o.nextid;
|
||||
}
|
||||
|
||||
observer_handler add(runnable callback) {
|
||||
ObserverHandler add(runnable callback) {
|
||||
std::lock_guard lock(mutex);
|
||||
int id = nextid++;
|
||||
runnables[id] = std::move(callback);
|
||||
return observer_handler(new int(id), [this](int* id) { //-V508
|
||||
return ObserverHandler(new int(id), [this](int* id) { //-V508
|
||||
std::lock_guard lock(mutex);
|
||||
runnables.erase(*id);
|
||||
delete id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue