simplified wrequire

This commit is contained in:
mutlusun 2017-01-20 19:15:56 +01:00
parent d942d1848c
commit 631c6e87ff
1 changed files with 1 additions and 4 deletions

View File

@ -65,10 +65,7 @@ function helpers.wrequire(table, key)
assert(os, "Vicious: platform not supported.")
for i = 1, #os do
local status, value =
pcall(function()
return require(table._NAME .. "." .. key .. "_" .. os[i])
end)
local status, value = pcall(require, table._NAME .. "." .. key .. "_" .. os[i])
if status then
ret = value
break