| 13 | |
| 14 | namespace OFFParserHelper { |
| 15 | void next_line(std::ifstream& fin, char* line, size_t LINE_SIZE) { |
| 16 | do { |
| 17 | if (fin.eof()) { |
| 18 | throw IOError("Error parsing OFF file"); |
| 19 | } |
| 20 | fin.getline(line, LINE_SIZE); |
| 21 | } while(strlen(line) == 0 || line[0] == '#' || |
| 22 | line[0] == '\n' || line[0] == '\r'); |
| 23 | } |
| 24 | |
| 25 | size_t lookup_color_index(const std::string& name) { |
| 26 | if (name == "red") return 0; |
no test coverage detected