diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-05-26 20:30:01 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-05-26 20:30:01 +0200 |
| commit | 8f5db09e6c6887dbd7a03912490b481c5ed6ae12 (patch) | |
| tree | 80e23a25c7e77b8a1ea9c3f75345111866ca24e6 /src/monitor-cmd.cc | |
| parent | 50c58a21d6fe694fe217ebd2aa402173575bfed1 (diff) | |
Workaround bad implementations of std::unique_ptr in std::pair
Diffstat (limited to 'src/monitor-cmd.cc')
| -rw-r--r-- | src/monitor-cmd.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/monitor-cmd.cc b/src/monitor-cmd.cc index 13a64f0..449656e 100644 --- a/src/monitor-cmd.cc +++ b/src/monitor-cmd.cc @@ -85,7 +85,8 @@ public: packages_.erase(it); } else { if (buf == data_.end()) { - buf = data_.insert(std::make_pair(id, Buffer::create(8192, 0))).first; + std::unique_ptr<Buffer> buffer(Buffer::create(8192, 0)); + buf = data_.emplace(id, std::move(buffer)).first; } buf->second->write(data, size); } |
