summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp1
-rw-r--r--src/wayland.cpp5
-rw-r--r--src/wayland.hpp10
3 files changed, 7 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 91b0c50..cc94190 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -6,7 +6,6 @@
#include <stdlib.h>
#include <string.h>
-#include <map>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/wayland.cpp b/src/wayland.cpp
index b644313..c660bec 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -74,9 +74,8 @@ void registry::global(uint32_t name, char const *iface, uint32_t v) {
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) {}
diff --git a/src/wayland.hpp b/src/wayland.hpp
index da3cc29..df9b68e 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -6,7 +6,7 @@
#include "util.h"
#include <functional>
-#include <map>
+#include <unordered_map>
#include <memory>
#include <vector>
@@ -69,7 +69,7 @@ struct display {
// |___/ |___/
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();
@@ -298,9 +298,9 @@ struct screen : public wayland_proxy<struct ivi_controller_screen>,
// \___\___/|_| |_|\__|_| \___/|_|_|\___|_|
//
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;