| 108 | } |
| 109 | |
| 110 | bool RedisRespParser::parseRespDouble(const QByteArray &data, double &dResult) { |
| 111 | if(data.isEmpty()) |
| 112 | return false; |
| 113 | |
| 114 | QString value; |
| 115 | if (data.at(0) == ':') { |
| 116 | value = data.mid(1); |
| 117 | value.chop(2); // 删除尾部\r\n |
| 118 | dResult = value.toDouble(); |
| 119 | } else |
| 120 | return false; |
| 121 | |
| 122 | return true; |
| 123 | } |
| 124 | |
| 125 | bool RedisRespParser::parseRespString(const QByteArray &data, QByteArray &sResult) { |
| 126 | if(data.isEmpty()) |
nothing calls this directly
no outgoing calls
no test coverage detected