In LevelDB's createKeyFor method we allocate size for 3 hashes but append 4 hashes. Eventhough append handles it intelligently, the code is misleading
This commit is contained in:
parent
9088fe376b
commit
98d5f3b8d7
1 changed files with 1 additions and 1 deletions
|
|
@ -150,7 +150,7 @@ func hashOf(s string) []byte {
|
|||
}
|
||||
|
||||
func (qs *QuadStore) createKeyFor(d [4]quad.Direction, q quad.Quad) []byte {
|
||||
key := make([]byte, 0, 2+(hashSize*3))
|
||||
key := make([]byte, 0, 2+(hashSize*4))
|
||||
// TODO(kortschak) Remove dependence on String() method.
|
||||
key = append(key, []byte{d[0].Prefix(), d[1].Prefix()}...)
|
||||
key = append(key, hashOf(q.Get(d[0]))...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue