| 145 | // Returns a copy of the passed vector that doesn't memory-own its entries. |
| 146 | template <typename T> |
| 147 | static inline std::vector<T*> MakeNonOwningPointerVector(const std::vector<std::unique_ptr<T>>& src) { |
| 148 | std::vector<T*> result; |
| 149 | result.reserve(src.size()); |
| 150 | for (const std::unique_ptr<T>& t : src) { |
| 151 | result.push_back(t.get()); |
| 152 | } |
| 153 | return result; |
| 154 | } |
| 155 | |
| 156 | } // namespace art_lkchan |
| 157 |