load navigation data
| 69 | |
| 70 | // load navigation data |
| 71 | bool Navigation::Load(const std::string &filename) { |
| 72 | std::ifstream f; |
| 73 | std::istream_iterator<uint8_t> start(f), end; |
| 74 | |
| 75 | // read the whole file |
| 76 | f.open(filename, std::ios::binary); |
| 77 | if (!f.is_open()) { |
| 78 | return false; |
| 79 | } |
| 80 | std::vector<uint8_t> content(start, end); |
| 81 | f.close(); |
| 82 | |
| 83 | // parse the content |
| 84 | return Load(std::move(content)); |
| 85 | } |
| 86 | |
| 87 | // load navigation data from memory |
| 88 | bool Navigation::Load(std::vector<uint8_t> content) { |
no test coverage detected