| 781 | } |
| 782 | |
| 783 | int extractPropertyFromInfo(const char *info, const char *key, double &val) { |
| 784 | char *line = strstr((char*)info, key); |
| 785 | if (line == nullptr) return 1; |
| 786 | line += strlen(key) + 1; // Skip past key name and following colon |
| 787 | char *newline = strchr(line, '\n'); |
| 788 | *newline = 0; // Terminate string after relevant line |
| 789 | val = strtod(line, nullptr); |
| 790 | return 0; |
| 791 | } |
| 792 | |
| 793 | int extractPropertyFromInfo(const char *info, const char *key, unsigned int &val) { |
| 794 | char *line = strstr((char*)info, key); |
no outgoing calls
no test coverage detected