提交 9ddb500c authored 作者: notoraptor's avatar notoraptor

Remove useless initialization.

上级 308a9f1f
...@@ -235,7 +235,6 @@ def struct_gen(args, struct_builders, blocks, sub): ...@@ -235,7 +235,6 @@ def struct_gen(args, struct_builders, blocks, sub):
# declares the storage # declares the storage
storage_decl = "\n".join(["PyObject* %s;" % arg for arg in args]) storage_decl = "\n".join(["PyObject* %s;" % arg for arg in args])
storage_init = "\n".join(["this->%s = NULL;" % arg for arg in args])
# in the constructor, sets the storage to the arguments # in the constructor, sets the storage to the arguments
storage_set = "\n".join(["this->%s = %s;" % (arg, arg) for arg in args]) storage_set = "\n".join(["this->%s = %s;" % (arg, arg) for arg in args])
# increments the storage's refcount in the constructor # increments the storage's refcount in the constructor
...@@ -291,8 +290,6 @@ def struct_gen(args, struct_builders, blocks, sub): ...@@ -291,8 +290,6 @@ def struct_gen(args, struct_builders, blocks, sub):
%(struct_decl)s %(struct_decl)s
%(name)s() { %(name)s() {
%(storage_init)s
// This is only somewhat safe because we: // This is only somewhat safe because we:
// 1) Are not a virtual class // 1) Are not a virtual class
// 2) Do not use any virtual classes in the members // 2) Do not use any virtual classes in the members
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论