mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
rename keycode, mousecode enumerations
This commit is contained in:
parent
9843a1fc27
commit
881edb7b28
22 changed files with 160 additions and 154 deletions
|
|
@ -31,12 +31,12 @@ namespace util {
|
|||
nextid = o.nextid;
|
||||
}
|
||||
|
||||
observer_handler add(std::function<bool(Types...)> handler) {
|
||||
ObserverHandler add(std::function<bool(Types...)> handler) {
|
||||
std::lock_guard lock(mutex);
|
||||
int id = nextid++;
|
||||
handlers[id] = std::move(handler);
|
||||
order.push_back(id);
|
||||
return observer_handler([this, id]() {
|
||||
return ObserverHandler([this, id]() {
|
||||
std::lock_guard lock(mutex);
|
||||
handlers.erase(id);
|
||||
order.erase(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue