]> git.e2factory.org Git - e2factory.git/commitdiff
licence: remove now unused licences_sorted vector
authorTobias Ulmer <tu@emlix.com>
Tue, 28 Feb 2017 19:14:42 +0000 (20:14 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 28 Feb 2017 19:17:32 +0000 (20:17 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/licence.lua

index 18a34dacb5af73b9ee976f27ed7628e1b770e265..dc6d9aa6bec60b58d7bef7c1b106868e92867655 100644 (file)
@@ -33,9 +33,6 @@ local strict = require("strict")
 --- Dictionary of loaded licence objects, indexed by name.
 licence.licences = {}
 
---- Vector of loaded licence objects, sorted by name.
-licence.licences_sorted = {}
-
 --- Licence base class.
 -- @type licence
 licence.licence = class("licence")
@@ -117,8 +114,8 @@ function licence.licence:licenceid()
 end
 --- @section end
 
---- Load project licence config, validate, and populate the licences,
--- licences_sorted tables with licence objects.
+--- Load project licence config, validate, and populate the licences table with
+-- licence objects.
 -- @return True on success, false on error
 -- @return Error object on failure.
 function licence.load_licence_config()
@@ -221,15 +218,6 @@ function licence.load_licence_config()
         end
     end
 
-    for _,l in pairs(licence.licences) do
-        table.insert(licence.licences_sorted, l)
-    end
-
-    local function s(a, b)
-        return a:get_name() < b:get_name()
-    end
-    table.sort(licence.licences_sorted, s)
-
     return true
 end