| 40 | } |
| 41 | |
| 42 | void LoadDatFile(std::filesystem::path str, std::function<void(std::string_view line)>&& cb) |
| 43 | { |
| 44 | std::ifstream hFile; |
| 45 | hFile.open(str); |
| 46 | if (hFile.is_open()) |
| 47 | { |
| 48 | std::string line; |
| 49 | while (std::getline(hFile, line)) |
| 50 | { |
| 51 | if (line[0] && line[0] != '#') |
| 52 | { |
| 53 | cb(line); |
| 54 | } |
| 55 | } |
| 56 | hFile.close(); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void Init() |
| 61 | { |