From 7e0f66e99ae47401c2339e7f57f9b4dd499b4501 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Tue, 14 Aug 2018 17:36:46 +0800 Subject: [PATCH] Polish code --- paddle/fluid/framework/op_desc.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/op_desc.cc b/paddle/fluid/framework/op_desc.cc index 9399b8675e1..af26cf28720 100644 --- a/paddle/fluid/framework/op_desc.cc +++ b/paddle/fluid/framework/op_desc.cc @@ -275,8 +275,9 @@ Attribute OpDesc::GetAttr(const std::string &name) const { return it->second; } -const proto::OpProto::Attr &OpDesc::GetProtoAttr(const std::string &name) { - proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto(); +const proto::OpProto::Attr &OpDesc::GetProtoAttr( + const std::string &name) const { + const proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto(); for (int i = 0; i != proto.attrs_size(); ++i) { const proto::OpProto::Attr &attr = proto.attrs(i); if (attr.name() == name) { -- GitLab