[lua] table.sort(_table, comp)使用要点

 table.sort(_table, comp)

comp中,当

if v1 < v2 then
  return true
else
  return false
end

必须时v1<v2,如果时v1<=v2,则会陷入无限循环不断把后面换前。

posted @ 2017-05-08 19:28  游戏开发学习er  阅读(1604)  评论(0)    收藏  举报