Skip to content

Commit 2250690

Browse files
authored
modules.lua: More idiomatic Lua.
1 parent f1604db commit 2250690

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/src/osd/modules.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616
function addlibfromstring(str)
1717
if (str==nil) then return end
1818
for w in str:gmatch("%S+") do
19-
if string.starts(w,"-l")==true then
19+
if string.starts(w,"-l") then
2020
links {
2121
string.sub(w,3)
2222
}
@@ -27,7 +27,7 @@ end
2727
function addoptionsfromstring(str)
2828
if (str==nil) then return end
2929
for w in str:gmatch("%S+") do
30-
if string.starts(w,"-l")==false then
30+
if not string.starts(w,"-l") then
3131
linkoptions {
3232
w
3333
}
@@ -385,11 +385,11 @@ function qtdebuggerbuild()
385385
MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/bin/moc --version 2>/dev/null")
386386
if (MOCTST=='') then
387387
local qt_host_libexecs = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_HOST_LIBEXECS")
388-
if (string.starts(qt_host_libexecs,"/")==false) then
388+
if not string.starts(qt_host_libexecs,"/") then
389389
qt_host_libexecs = _OPTIONS["QT_HOME"] .. "/libexec"
390390
end
391391
MOCTST = backtick(qt_host_libexecs .. "/moc --version 2>/dev/null")
392-
if (MOCTST=='') then
392+
if MOCTST=='' then
393393
print("Qt's Meta Object Compiler (moc) wasn't found!")
394394
os.exit(1)
395395
else
@@ -403,7 +403,7 @@ function qtdebuggerbuild()
403403
if (MOCTST=='') then
404404
MOCTST = backtick("which moc 2>/dev/null")
405405
end
406-
if (MOCTST=='') then
406+
if MOCTST=='' then
407407
print("Qt's Meta Object Compiler (moc) wasn't found!")
408408
os.exit(1)
409409
end

0 commit comments

Comments
 (0)