Remove pointer indirection by changing Chunk definition

This commit is contained in:
Junegunn Choi committed 2017-07-16 23:34:32 +09:00
1 parent 7b5ccc45bc
commit d4f3d5a164
7 files changed
+29 -23

No files matched your search

+6
View File
@@ -19,6 +19,12 @@ func (item *Item) Index() int32 {
return item.index
}
var nilItem = Item{index: -1}
func (item *Item) Nil() bool {
return item.index < 0
}
func (item *Item) TrimLength() int32 {
if item.trimLength >= 0 {
return item.trimLength