diff options
| author | Joel Klinghed <the_jk@opera.com> | 2026-05-29 11:22:59 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2026-05-29 11:22:59 +0200 |
| commit | a6ac90c83edbade279cccfdb6d8ca02d8e5a60b8 (patch) | |
| tree | 02812431b6aa823863fd393439688fdcd1a4d76a /src/monitor.cc | |
| parent | 9d1bbc93bb4a49ae73ae39ef323e2e18f303f0d9 (diff) | |
Use more effective lookup
Diffstat (limited to 'src/monitor.cc')
| -rw-r--r-- | src/monitor.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/monitor.cc b/src/monitor.cc index b9c6085..17c3dfd 100644 --- a/src/monitor.cc +++ b/src/monitor.cc @@ -44,26 +44,6 @@ public: return machines_.size(); } - uint32_t id(size_t index) const override { - auto it = machines_.begin(); - while (index--) ++it; - if (it == machines_.end()) { - assert(false); - return 0xffffffff; - } - return it->first; - } - - Machine machine_at(size_t index) const override { - auto it = machines_.begin(); - while (index--) ++it; - if (it == machines_.end()) { - assert(false); - return EMPTY; - } - return it->second; - } - Machine machine(uint32_t id) const override { auto it = machines_.find(id); if (it == machines_.end()) { |
