Return condition value instead of conditional true/false

Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Felix Bier 2012-05-13 00:23:23 +02:00 committed by Uli Schlachter
parent 558bc96099
commit bd0c9f75ae
1 changed files with 1 additions and 7 deletions

View File

@ -24,13 +24,7 @@ end
--- Handle a button event on a widget. This is used internally.
function handle_button(event, widget, x, y, button, modifiers)
local function is_any(mod)
if #mod ~= 1 then
return false
end
if mod[1] ~= "Any" then
return false
end
return true
return #mod == 1 and mod[1] == "Any"
end
local function tables_equal(a, b)