| 93 | } |
| 94 | |
| 95 | bool RedisRespParser::parseRespInteger(const QByteArray &data, qlonglong &llResult) { |
| 96 | if(data.isEmpty()) |
| 97 | return false; |
| 98 | |
| 99 | QString value; |
| 100 | if (data.at(0) == ':') { |
| 101 | value = data.mid(1); |
| 102 | value.chop(2); // 删除尾部\r\n |
| 103 | llResult = value.toLongLong(); |
| 104 | } else |
| 105 | return false; |
| 106 | |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | bool RedisRespParser::parseRespDouble(const QByteArray &data, double &dResult) { |
| 111 | if(data.isEmpty()) |
nothing calls this directly
no outgoing calls
no test coverage detected