diff --git a/cartographer/common/task.cc b/cartographer/common/task.cc index 7202268..dc3d28b 100644 --- a/cartographer/common/task.cc +++ b/cartographer/common/task.cc @@ -42,7 +42,7 @@ void Task::AddDependency(std::weak_ptr dependency) { { MutexLocker locker(&mutex_); CHECK_EQ(state_, NEW); - if (shared_dependency = dependency.lock()) { + if ((shared_dependency = dependency.lock())) { ++uncompleted_dependencies_; } } diff --git a/cartographer/common/task_test.cc b/cartographer/common/task_test.cc index 935b7a5..69eb54c 100644 --- a/cartographer/common/task_test.cc +++ b/cartographer/common/task_test.cc @@ -34,14 +34,14 @@ class MockCallback { class FakeThreadPool : public ThreadPoolInterface { public: - void NotifyDependenciesCompleted(Task* task) { + void NotifyDependenciesCompleted(Task* task) override { auto it = tasks_not_ready_.find(task); ASSERT_NE(it, tasks_not_ready_.end()); task_queue_.push_back(it->second); tasks_not_ready_.erase(it); } - void Schedule(const std::function& work_item) { + void Schedule(const std::function& work_item) override { LOG(FATAL) << "not implemented"; }