| 15 | |
| 16 | namespace ccls { |
| 17 | Pos Pos::fromString(const std::string &encoded) { |
| 18 | char *p = const_cast<char *>(encoded.c_str()); |
| 19 | uint16_t line = uint16_t(strtoul(p, &p, 10) - 1); |
| 20 | assert(*p == ':'); |
| 21 | p++; |
| 22 | int16_t column = int16_t(strtol(p, &p, 10)) - 1; |
| 23 | return {line, column}; |
| 24 | } |
| 25 | |
| 26 | std::string Pos::toString() { |
| 27 | char buf[99]; |
nothing calls this directly
no outgoing calls
no test coverage detected