mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-08 03:00:26 +01:00
Removed obsolete coord to bytes transformation. Added TODO.
This commit is contained in:
parent
d2e9984529
commit
8dba5f5f3b
2
TODO
Normal file
2
TODO
Normal file
|
@ -0,0 +1,2 @@
|
|||
- Check if the mutex stuff in the LevelDB is really needed.
|
||||
LevelDB has some threadi-safety already.
|
10
coords.go
10
coords.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user