M io/router/router.go => io/router/router.go +4 -4
@@ 538,11 538,11 @@ func (q *Router) collect() {
// Semantic ops.
case ops.TypeSemanticLabel:
- lbl := encOp.Refs[0].(*string)
- pc.semanticLabel(*lbl)
+ lbl := encOp.Refs[0].(string)
+ pc.semanticLabel(lbl)
case ops.TypeSemanticDesc:
- desc := encOp.Refs[0].(*string)
- pc.semanticDesc(*desc)
+ desc := encOp.Refs[0].(string)
+ pc.semanticDesc(desc)
case ops.TypeSemanticClass:
class := semantic.ClassOp(encOp.Data[1])
pc.semanticClass(class)
M io/semantic/semantic.go => io/semantic/semantic.go +2 -4
@@ 40,14 40,12 @@ type SelectedOp bool
type DisabledOp bool
func (l LabelOp) Add(o *op.Ops) {
- s := string(l)
- data := ops.Write1(&o.Internal, ops.TypeSemanticLabelLen, &s)
+ data := ops.Write1(&o.Internal, ops.TypeSemanticLabelLen, string(l))
data[0] = byte(ops.TypeSemanticLabel)
}
func (d DescriptionOp) Add(o *op.Ops) {
- s := string(d)
- data := ops.Write1(&o.Internal, ops.TypeSemanticDescLen, &s)
+ data := ops.Write1(&o.Internal, ops.TypeSemanticDescLen, string(d))
data[0] = byte(ops.TypeSemanticDesc)
}