add nil check, remove 'self' as argument, just get it through action.current()
This commit is contained in:
parent
7ce257badc
commit
53e4145765
@ -214,7 +214,11 @@
|
|||||||
-- True if the feature is supported, false otherwise.
|
-- True if the feature is supported, false otherwise.
|
||||||
---
|
---
|
||||||
|
|
||||||
function action.supports(self, feature)
|
function action.supports(feature)
|
||||||
|
if not feature then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
local self = action.current()
|
||||||
if not self then
|
if not self then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -117,11 +117,15 @@
|
|||||||
function p.project.bake(self)
|
function p.project.bake(self)
|
||||||
local sln = self.solution
|
local sln = self.solution
|
||||||
|
|
||||||
if not premake.action.supports(premake.action.current(), self.language) then
|
-- check if the language for this project is supported by the action.
|
||||||
|
|
||||||
|
if not p.action.supports(self.language) then
|
||||||
printf(" Unsupported language '%s' used for '%s'.", self.language, self.name)
|
printf(" Unsupported language '%s' used for '%s'.", self.language, self.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not premake.action.supports(premake.action.current(), self.kind) then
|
-- check if the kind for this project is supported by the action.
|
||||||
|
|
||||||
|
if not p.action.supports(self.kind) then
|
||||||
printf(" Unsupported kind '%s' used for '%s'.", self.kind, self.name)
|
printf(" Unsupported kind '%s' used for '%s'.", self.kind, self.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user