diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-15 12:28:29 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-16 23:34:32 +0900 |
commit | d4f3d5a16423fbf039644f04516c052d1654326c (patch) | |
tree | 2cb3f9519a23e9e9c162d135636d9f99373deadc /src/item.go | |
parent | 7b5ccc45bc76f289fe2c48cf91e895b9ca99b1e2 (diff) |
Remove pointer indirection by changing Chunk definition
Diffstat (limited to 'src/item.go')
-rw-r--r-- | src/item.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/item.go b/src/item.go index c67ac7ab..955c31d8 100644 --- a/src/item.go +++ b/src/item.go @@ -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 |