auto b = this->bindings.find(iface);
if (b != this->bindings.end())
b->second(this->proxy, name, v);
- else
- logdebug("wl::registry @ %p global n %u i %s v %u", this->proxy, name,
- iface, v);
+ logdebug("wl::registry @ %p global n %u i %s v %u", this->proxy, name,
+ iface, v);
}
void registry::global_remove(uint32_t name) {}
#include "util.h"
#include <functional>
-#include <map>
+#include <unordered_map>
#include <memory>
#include <vector>
// |___/ |___/
struct registry : public wayland_proxy<struct wl_registry> {
typedef std::function<void(struct wl_registry *, uint32_t, uint32_t)> binder;
- std::map<std::string, binder> bindings;
+ std::unordered_map<std::string, binder> bindings;
registry(struct wl_display *d);
~registry();
// \___\___/|_| |_|\__|_| \___/|_|_|\___|_|
//
struct controller : public wayland_proxy<struct ivi_controller> {
- std::map<uint32_t, std::unique_ptr<struct surface>> surfaces;
- std::map<uint32_t, std::unique_ptr<struct layer>> layers;
- std::map<uint32_t, std::unique_ptr<struct screen>> screens;
+ std::unordered_map<uint32_t, std::unique_ptr<struct surface>> surfaces;
+ std::unordered_map<uint32_t, std::unique_ptr<struct layer>> layers;
+ std::unordered_map<uint32_t, std::unique_ptr<struct screen>> screens;
typedef std::pair<char const *, std::function<void(struct controller *)>>
name_task_pair;