| 178 | } |
| 179 | |
| 180 | bool RedisRespParser::parseRespError(const QByteArray &data, QByteArray &sResult) { |
| 181 | if(data.isEmpty()) |
| 182 | return false; |
| 183 | |
| 184 | if (data.at(0) == '-') { |
| 185 | sResult = data.mid(1); |
| 186 | sResult.chop(2); // 删除尾部\r\n |
| 187 | } else |
| 188 | return false; |
| 189 | |
| 190 | return true; |
| 191 | } |
| 192 | |
| 193 | bool RedisRespParser::parseRespArray(const QByteArray &data, QList<RespType> &vResult, int &iResult) { |
| 194 | if(data.isEmpty()) |
nothing calls this directly
no outgoing calls
no test coverage detected