From 401b08430690535f10bfbf2e07ab671cdf1f81db Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 5 Jan 2019 15:05:06 +1100 Subject: [PATCH] tools/spec: remove dead code --- tools/spec.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tools/spec.py b/tools/spec.py index 9fe8bca..e101a4d 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -197,25 +197,6 @@ class Bitmask(Type): def define(self, reg: Registry): 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): @@ -281,9 +262,6 @@ class Enum(Type): def declare(self): return "" - return "enum %(name)s : int32_t;" % { - "name": self.name - } def define(self, reg: Registry): values = ("%(name)s = %(value)s" % {"name": k, "value": v.value} for (k, v) in self.values.items())