From 2c91c7962fc71bed973775da83a0cd3f10effece Mon Sep 17 00:00:00 2001 From: MineRobber___T Date: Mon, 17 Jul 2017 01:49:14 -0400 Subject: [PATCH] Remove unused tImage table and slightly clean code --- .../assets/computercraft/lua/rom/apis/paintutils.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/resources/assets/computercraft/lua/rom/apis/paintutils.lua b/src/main/resources/assets/computercraft/lua/rom/apis/paintutils.lua index 89d8efff2..d5544498a 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/paintutils.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/paintutils.lua @@ -15,7 +15,6 @@ local function parseLine( tImageArg, sLine ) tLine[x] = tColourLookup[ string.byte(sLine,x,x) ] or 0 end table.insert( tImageArg, tLine ) - return tImageArg end function parseImage( sRawData ) @@ -24,7 +23,7 @@ function parseImage( sRawData ) end local tImage = {} for sLine in ( sRawData .. "\n" ):gmatch( "(.-)\n" ) do -- read each line like original file handling did - tImage = parseLine( tImage, sLine ) + parseLine( tImage, sLine ) end return tImage end @@ -35,7 +34,6 @@ function loadImage( sPath ) end if fs.exists( sPath ) then - local tImage = {} local file = io.open( sPath, "r" ) local sContent = file:readAll() file:close()