Fix some Clang warnings. (#1109)
task.cc: -Wparentheses task_test.cc: -Winconsistent-missing-overridemaster
parent
d9ada58710
commit
3d2ca564b6
|
@ -42,7 +42,7 @@ void Task::AddDependency(std::weak_ptr<Task> dependency) {
|
||||||
{
|
{
|
||||||
MutexLocker locker(&mutex_);
|
MutexLocker locker(&mutex_);
|
||||||
CHECK_EQ(state_, NEW);
|
CHECK_EQ(state_, NEW);
|
||||||
if (shared_dependency = dependency.lock()) {
|
if ((shared_dependency = dependency.lock())) {
|
||||||
++uncompleted_dependencies_;
|
++uncompleted_dependencies_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,14 +34,14 @@ class MockCallback {
|
||||||
|
|
||||||
class FakeThreadPool : public ThreadPoolInterface {
|
class FakeThreadPool : public ThreadPoolInterface {
|
||||||
public:
|
public:
|
||||||
void NotifyDependenciesCompleted(Task* task) {
|
void NotifyDependenciesCompleted(Task* task) override {
|
||||||
auto it = tasks_not_ready_.find(task);
|
auto it = tasks_not_ready_.find(task);
|
||||||
ASSERT_NE(it, tasks_not_ready_.end());
|
ASSERT_NE(it, tasks_not_ready_.end());
|
||||||
task_queue_.push_back(it->second);
|
task_queue_.push_back(it->second);
|
||||||
tasks_not_ready_.erase(it);
|
tasks_not_ready_.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Schedule(const std::function<void()>& work_item) {
|
void Schedule(const std::function<void()>& work_item) override {
|
||||||
LOG(FATAL) << "not implemented";
|
LOG(FATAL) << "not implemented";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue