提交 8c7ee7a5 编写于 作者: Q qiaolongfei

optimize code

上级 ffe1b692
...@@ -35,8 +35,7 @@ VarDescBind *BlockDescBind::Var(const std::string &name) const { ...@@ -35,8 +35,7 @@ VarDescBind *BlockDescBind::Var(const std::string &name) const {
} }
bool BlockDescBind::HasVar(const std::string &name) const { bool BlockDescBind::HasVar(const std::string &name) const {
auto it = vars_.find(name); return vars_.find(name) != vars_.end();
return it != vars_.end();
} }
std::vector<VarDescBind *> BlockDescBind::AllVars() const { std::vector<VarDescBind *> BlockDescBind::AllVars() const {
......
...@@ -19,6 +19,9 @@ limitations under the License. */ ...@@ -19,6 +19,9 @@ limitations under the License. */
namespace paddle { namespace paddle {
namespace framework { namespace framework {
// TODO(longfei): Once after both CompileTimeInferShapeContext and
// RuntimeInferShapeContext get merged, we can rename InferShapeContextBase into
// InferShapeContext so to replace the current InferShapeContext.
class InferShapeContextBase { class InferShapeContextBase {
public: public:
virtual ~InferShapeContextBase() {} virtual ~InferShapeContextBase() {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册