diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 20:50:55 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 20:50:55 +0200 |
| commit | c5fe5327f93355f409a3f8c8e27c3f12ea856559 (patch) | |
| tree | 777819859ce508a40e338f5ffc3eaa356aec63a2 /src/gui_qt.cc | |
| parent | 8a180486226576173c4850960825bb9cbe91945b (diff) | |
Fix compilation on older G++/libc++ with broken unordered_map.emplace
Diffstat (limited to 'src/gui_qt.cc')
| -rw-r--r-- | src/gui_qt.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui_qt.cc b/src/gui_qt.cc index 4d6eba1..499ac08 100644 --- a/src/gui_qt.cc +++ b/src/gui_qt.cc @@ -1654,8 +1654,8 @@ public: } void add(int fd, uint8_t events, FdCallback const& callback) override { - auto pair = fds_.emplace(fd, new Fd(fd, callback)); - auto& handle = pair.first->second; + auto& handle = fds_[fd]; + handle.reset(new Fd(fd, callback)); handle->read_->setEnabled(events & EVENT_READ); handle->write_->setEnabled(events & EVENT_WRITE); } |
