summaryrefslogtreecommitdiff
path: root/src/gui_qt.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_qt.cc')
-rw-r--r--src/gui_qt.cc4
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);
}