mirror of https://bitbucket.org/ausocean/av.git
psi: removed conditional in HasTime and HasLocation and just used result of logic operation
This commit is contained in:
parent
d665bece23
commit
fc7f5501e0
|
@ -44,19 +44,13 @@ func TimeBytes(t uint64) []byte {
|
|||
// HasTime takes a psi as a byte slice and checks to see if it has a time descriptor
|
||||
// - if so return nil, otherwise return error
|
||||
func HasTime(p []byte) bool {
|
||||
if p[TimeTagIndx] == TimeDescTag {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return p[TimeTagIndx] == TimeDescTag
|
||||
}
|
||||
|
||||
// HasLocation takes a psi as a byte slice and checks to see if it has a location descriptor
|
||||
// - if so return nil, otherwise return error
|
||||
func HasLocation(p []byte) bool {
|
||||
if p[LocationTagIndx] == LocationDescTag {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return p[LocationTagIndx] == LocationDescTag
|
||||
}
|
||||
|
||||
// UpdateTime takes the byte slice representation of a psi-pmt as well as a time
|
||||
|
|
Loading…
Reference in New Issue