| 606 | } |
| 607 | |
| 608 | inline bool HexStrToInt(const std::string& data, uint8_t& value) |
| 609 | { |
| 610 | int iTmp(0); |
| 611 | if (sscanf(data.c_str(), "%x", &iTmp) == 1) |
| 612 | { |
| 613 | if (iTmp > 256) |
| 614 | value = 255; |
| 615 | else if (iTmp < 0) |
| 616 | value = 0; |
| 617 | else |
| 618 | value = (uint8_t) iTmp; |
| 619 | |
| 620 | return true; |
| 621 | } |
| 622 | |
| 623 | return false; |
| 624 | } |
| 625 | |
| 626 | cec_command CLibCEC::CommandFromString(const char* strCommand) |
| 627 | { |
nothing calls this directly
no outgoing calls
no test coverage detected