fix bug priorityqueue

This commit is contained in:
huangsimin 2018-11-29 16:23:23 +08:00
parent 10f43ba51a
commit 562ef11e2a

View File

@ -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
// }