comparison mod_cloud_notify/mod_cloud_notify.lua @ 3078:6b860de18a53

mod_cloud_notify: Don't use deprecated table.getn
author tmolitor <thilo@eightysoft.de>
date Fri, 01 Jun 2018 17:54:07 +0200
parents 6abee021d9db
children 2a918a8c47db
comparison
equal deleted inserted replaced
3077:f16b021e8a61 3078:6b860de18a53
57 -- the first time, generate the index 57 -- the first time, generate the index
58 t.__orderedIndex = __genOrderedIndex( t ) 58 t.__orderedIndex = __genOrderedIndex( t )
59 key = t.__orderedIndex[1] 59 key = t.__orderedIndex[1]
60 else 60 else
61 -- fetch the next value 61 -- fetch the next value
62 for i = 1,table.getn(t.__orderedIndex) do 62 for i = 1, #t.__orderedIndex do
63 if t.__orderedIndex[i] == state then 63 if t.__orderedIndex[i] == state then
64 key = t.__orderedIndex[i+1] 64 key = t.__orderedIndex[i+1]
65 end 65 end
66 end 66 end
67 end 67 end