| 155 | |
| 156 | template <typename T> |
| 157 | void LoadFromFile(std::vector<T> &output, const std::string path) { |
| 158 | std::ifstream file(path); |
| 159 | output.clear(); |
| 160 | if (!file.good()) |
| 161 | return; |
| 162 | |
| 163 | unsigned size; |
| 164 | Read(file, size, path.c_str()); |
| 165 | output.resize(size); |
| 166 | Read(file, make_span(output), path.c_str()); |
| 167 | } |
| 168 | |
| 169 | template <> |
| 170 | void LoadFromFile(std::vector<RLEMaskPtr> &output, const std::string path) { |