ponywolf / ponytiled

PonyTiled a simple Tiled Map Loader for Corona SDK
MIT License
83 stars 22 forks source link

Replacement for table.insert #14

Closed ldurniat closed 6 years ago

ldurniat commented 6 years ago

Hi,

You could replace lines 74, 94 and 95 from ponytiled.lua

local gid = 0
...
gid = gid + 1
table.insert( frames, gid, element ) 

with frames[#frames + 1] = element

It doesn't change how ponytiled work but you gain a bit of speed:)

Have a nice day:)

ldurniat

superqix commented 6 years ago

Always love to simplify things....