Parse the version number and store the results that were successfully parsed.
| 440 | // Parse the version number and store the results that were |
| 441 | // successfully parsed. |
| 442 | unsigned int parseVersion(std::string const& version, unsigned int& major, |
| 443 | unsigned int& minor, unsigned int& patch, |
| 444 | unsigned int& tweak) |
| 445 | { |
| 446 | return static_cast<unsigned int>(std::sscanf( |
| 447 | version.c_str(), "%u.%u.%u.%u", &major, &minor, &patch, &tweak)); |
| 448 | } |
| 449 | |
| 450 | } // anonymous namespace |
| 451 |
no test coverage detected
searching dependent graphs…