tools/spec: remove dead code
This commit is contained in:
parent
408f278e29
commit
401b084306
@ -197,25 +197,6 @@ class Bitmask(Type):
|
|||||||
def define(self, reg: Registry):
|
def define(self, reg: Registry):
|
||||||
return self.declare()
|
return self.declare()
|
||||||
|
|
||||||
if not self.requires:
|
|
||||||
return self.declare()
|
|
||||||
|
|
||||||
return "using %(name)s = %(requires)s;" % {
|
|
||||||
"name": self.name,
|
|
||||||
"requires": self.requires
|
|
||||||
}
|
|
||||||
|
|
||||||
source = reg.types[self.requires]
|
|
||||||
members = ["%(k)s = %(v)s" % {"k":k, "v":v.value} for (k,v) in source.values.items()]
|
|
||||||
|
|
||||||
return """enum %(name)s : %(type)s {
|
|
||||||
%(members)s
|
|
||||||
}""" % {
|
|
||||||
"name": self.name,
|
|
||||||
"type": self.type,
|
|
||||||
"members": ",\n".join(members)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class Handle(Type):
|
class Handle(Type):
|
||||||
@ -281,9 +262,6 @@ class Enum(Type):
|
|||||||
|
|
||||||
def declare(self):
|
def declare(self):
|
||||||
return ""
|
return ""
|
||||||
return "enum %(name)s : int32_t;" % {
|
|
||||||
"name": self.name
|
|
||||||
}
|
|
||||||
|
|
||||||
def define(self, reg: Registry):
|
def define(self, reg: Registry):
|
||||||
values = ("%(name)s = %(value)s" % {"name": k, "value": v.value} for (k, v) in self.values.items())
|
values = ("%(name)s = %(value)s" % {"name": k, "value": v.value} for (k, v) in self.values.items())
|
||||||
|
Loading…
Reference in New Issue
Block a user