提交 7e0f66e9 编写于 作者: M minqiyang

Polish code

上级 5338417b
...@@ -275,8 +275,9 @@ Attribute OpDesc::GetAttr(const std::string &name) const { ...@@ -275,8 +275,9 @@ Attribute OpDesc::GetAttr(const std::string &name) const {
return it->second; return it->second;
} }
const proto::OpProto::Attr &OpDesc::GetProtoAttr(const std::string &name) { const proto::OpProto::Attr &OpDesc::GetProtoAttr(
proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto(); const std::string &name) const {
const proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto();
for (int i = 0; i != proto.attrs_size(); ++i) { for (int i = 0; i != proto.attrs_size(); ++i) {
const proto::OpProto::Attr &attr = proto.attrs(i); const proto::OpProto::Attr &attr = proto.attrs(i);
if (attr.name() == name) { if (attr.name() == name) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册