mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user