diff options
Diffstat (limited to 'examples/resources/lib/rectangle.lua')
| -rw-r--r-- | examples/resources/lib/rectangle.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/resources/lib/rectangle.lua b/examples/resources/lib/rectangle.lua index 236c432..2f9ad6c 100644 --- a/examples/resources/lib/rectangle.lua +++ b/examples/resources/lib/rectangle.lua @@ -49,14 +49,14 @@ function Rectangle:new( x, y, width, height ) x, y, width, height = 0, 0, 0, 0 end - local o = { - x = x, - y = y, - width = width, - height = height, - } - setmetatable( o, Rectangle.meta ) - return o + local object = setmetatable( {}, Rectangle.meta ) + + object.x = x + object.y = y + object.width = width + object.height = height + + return object end function Rectangle:set( x, y, width, height ) |
