mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 01:10:17 +01:00
One more use of the scratch of redis client.
This commit is contained in:
parent
41187af7db
commit
427ec305fc
@ -136,14 +136,15 @@ func (client *RedisClient) QueryCuboid(cuboid Cuboid, fn func(*Block)) (count in
|
|||||||
key int64
|
key int64
|
||||||
)
|
)
|
||||||
|
|
||||||
for ; ; count++ {
|
for s := client.scratch[:]; ; count++ {
|
||||||
if size, err = client.readBulkString(&data); err != nil {
|
p := &s
|
||||||
|
if size, err = client.readBulkString(p); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if size <= 0 {
|
if size <= 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if key, err = DecodeStringFromBytes(data[:size]); err != nil {
|
if key, err = DecodeStringFromBytes((*p)[:size]); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
block.Coord = PlainToCoord(key)
|
block.Coord = PlainToCoord(key)
|
||||||
|
Loading…
Reference in New Issue
Block a user