Some C++ code are not needed (#841)

1. Anonymous namespace means internal linkage, static keyword is not needed.
2. The default constructor of std::shared_ptr initializes the pointer to
   nullptr, you don't need to explicitly set it.
This commit is contained in:
Cheng
2024-03-19 09:04:10 +09:00
committed by GitHub
parent 16546c70d8
commit d39ed54f8e
7 changed files with 13 additions and 12 deletions

View File

@@ -118,7 +118,7 @@ void eval(const std::vector<array>& outputs) {
arr_deps.push_back(it->second);
}
}
std::shared_ptr<std::promise<void>> p{nullptr};
std::shared_ptr<std::promise<void>> p;
if (auto it = deps.find(arr.primitive_id()); it != deps.end()) {
p = std::make_unique<std::promise<void>>();
ps.push_back(p);