MCPcopy Create free account
hub / github.com/cc20110101/RedisView / parseRespDouble

Method parseRespDouble

src/RedisView/RedisLib/RedisRespParser.cpp:110–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool 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
125bool RedisRespParser::parseRespString(const QByteArray &data, QByteArray &sResult) {
126 if(data.isEmpty())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected