~sethj/ubuntu/wily/unity/fix-for-1445595

« back to all changes in this revision

Viewing changes to UnityCore/GLibDBusServer.cpp

  • Committer: Marco Trevisan (Treviño)
  • Date: 2015-02-03 09:46:48 UTC
  • mto: (3899.5.3 panel-titles-fixes)
  • mto: This revision was merged to the branch mainline in revision 3920.
  • Revision ID: mail@3v1n0.net-20150203094648-5a4z0fd462y5aa9u
Unity: Use unordered_map whenever possible

As iterating over it seems just fast as in the ordered version, we just speedup lookups and insertions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
* Authored by: Marco Trevisan (Treviño) <marco.trevisan@canonical.com>
18
18
*/
19
19
 
 
20
#include <unordered_map>
20
21
#include <NuxCore/Logger.h>
21
22
 
22
23
#include "GLibDBusServer.h"
406
407
 
407
408
  GDBusInterfaceVTable interface_vtable_;
408
409
  std::shared_ptr<GDBusInterfaceInfo> interface_info_;
409
 
  std::map<guint, std::string> registrations_;
410
 
  std::map<std::string, glib::Object<GDBusConnection>> connection_by_path_;
 
410
  std::unordered_map<guint, std::string> registrations_;
 
411
  std::unordered_map<std::string, glib::Object<GDBusConnection>> connection_by_path_;
411
412
};
412
413
 
413
414
DBusObject::DBusObject(std::string const& introspection_xml, std::string const& interface_name)