Quellcode durchsuchen

Remove unused variable

nagadomi vor 9 Jahren
Ursprung
Commit
b63e08905b
2 geänderte Dateien mit 1 neuen und 6 gelöschten Zeilen
  1. 0 1
      lib/pairwise_transform.lua
  2. 1 5
      web.lua

+ 0 - 1
lib/pairwise_transform.lua

@@ -52,7 +52,6 @@ local function active_cropping(x, y, size, p, tries)
       local yc = iproc.crop(y, xi, yi, xi + size, yi + size)
       return xc, yc
    else
-      local samples = {}
       local best_se = 0.0
       local best_xc, best_yc
       local m = torch.FloatTensor(x:size(1), size, size)

+ 1 - 5
web.lua

@@ -90,12 +90,8 @@ end
 local function get_image(req)
    local file = req:get_argument("file", "")
    local url = req:get_argument("url", "")
-   local blob = nil
-   local img = nil
-   local alpha = nil
    if file and file:len() > 0 then
-      blob = file
-      return image_loader.decode_float(blob)
+      return image_loader.decode_float(file)
    elseif url and url:len() > 0 then
       return cache_url(url)
    end