Removed obsolete coord to bytes transformation. Added TODO.

This commit is contained in:
Sascha L. Teichmann 2014-08-08 15:04:53 +02:00
parent d2e9984529
commit 8dba5f5f3b
2 changed files with 2 additions and 10 deletions

2
TODO Normal file
View File

@ -0,0 +1,2 @@
- Check if the mutex stuff in the LevelDB is really needed.
LevelDB has some threadi-safety already.

View File

@ -6,16 +6,6 @@ package main
import "strconv"
// Returns database pos as a byte slice.
func pos2bytes(pos int64) []byte {
buf := make([]byte, 8, 8)
for i := 7; i >= 0; i-- {
buf[i] = byte(pos & 0xff)
pos >>= 8
}
return buf
}
// Constructs a database key out of byte slice.
func bytes2pos(key []byte) (pos int64, err error) {
return strconv.ParseInt(string(key), 10, 64)