Skip to content

Commit c2c7d84

Browse files
committed
Removed unnecessary func NewPropertyEntry()
1 parent 01a67a0 commit c2c7d84

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sendtables/entity.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (e *Entity) CollectProperties(ppBase *map[int]PropValue) {
117117
func NewEntity(id int, serverClass *ServerClass) *Entity {
118118
props := make([]PropertyEntry, 0, len(serverClass.FlattenedProps))
119119
for i := range serverClass.FlattenedProps {
120-
props = append(props, NewPropertyEntry(&serverClass.FlattenedProps[i], i))
120+
props = append(props, PropertyEntry{index: i, entry: &serverClass.FlattenedProps[i]})
121121
}
122122
return &Entity{ID: id, ServerClass: serverClass, props: props}
123123
}
@@ -153,8 +153,3 @@ func (pe *PropertyEntry) RegisterPropertyUpdateHandler(handler PropertyUpdateHan
153153

154154
// PropertyUpdateHandler is the interface for handlers that are interested in PropertyEntry changes.
155155
type PropertyUpdateHandler func(PropValue)
156-
157-
// NewPropertyEntry creates a new PropertyEntry from a FlattenedPropEntry and index
158-
func NewPropertyEntry(entry *FlattenedPropEntry, index int) PropertyEntry {
159-
return PropertyEntry{index: index, entry: entry}
160-
}

0 commit comments

Comments
 (0)