summaryrefslogtreecommitdiff
path: root/src/monitor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/monitor.cc')
-rw-r--r--src/monitor.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/monitor.cc b/src/monitor.cc
index 152bac3..c665034 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -122,7 +122,8 @@ private:
if (channel_) return;
if (!discover_) {
- discover_.reset(new DiscoverSched(netname_, 2, hostname_, port_));
+ discover_ =
+ std::make_unique<DiscoverSched>(netname_, 2, hostname_, port_);
}
channel_.reset(discover_->try_get_scheduler());
@@ -417,6 +418,7 @@ Monitor::Machine const MonitorImpl::EMPTY;
} // namespace
// static
-Monitor* Monitor::create(std::shared_ptr<Looper> const& looper) {
- return new MonitorImpl(looper);
+std::unique_ptr<Monitor> Monitor::create(
+ std::shared_ptr<Looper> const& looper) {
+ return std::make_unique<MonitorImpl>(looper);
}