From 562ef11e2ac0f8fe5537f34bd18d66cc09d46736 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 29 Nov 2018 16:23:23 +0800 Subject: [PATCH] fix bug priorityqueue --- structure.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/structure.go b/structure.go index bb75a84..e3c10f9 100644 --- a/structure.go +++ b/structure.go @@ -189,15 +189,7 @@ func (nodes *parseQueue) Less(i, j int) bool { } // Push 实现heap.Interface接口定义的额外方法 -func (nodes *parseQueue) Push(exec// func (pqe *pQueueExecute) String() string { - // content := "" - // for _, node := range pqe.nodes { - // content += strconv.Itoa(node.Prioty) - // content += " " - // } - // return content - // } - interface{}) { +func (nodes *parseQueue) Push(exec interface{}) { *nodes = append(*nodes, exec.(*parseFunction)) } @@ -242,7 +234,6 @@ func (pqe *pQueueExecute) Len() int { return pqe.nodes.Len() } - // func (pqe *pQueueExecute) String() string { // content := "" // for _, node := range pqe.nodes { @@ -251,4 +242,3 @@ func (pqe *pQueueExecute) Len() int { // } // return content // } -