提交 1fabbbad 编写于 作者: T tangwei12

modify const to const &

上级 568a329c
...@@ -22,7 +22,7 @@ namespace framework { ...@@ -22,7 +22,7 @@ namespace framework {
namespace details { namespace details {
Checkpoint::Save(const framework::Scope& scope, const platform::Place& place, Checkpoint::Save(const framework::Scope& scope, const platform::Place& place,
const std::string& save_dir, const std::string& var_name, const std::string& save_dir, const std::string& var_name,
const bool overwrite) { const bool& overwrite) {
auto* var = scope.FindVar(var_name); auto* var = scope.FindVar(var_name);
PADDLE_ENFORCE(var != nullptr, "Cannot find variable %s for save_op", PADDLE_ENFORCE(var != nullptr, "Cannot find variable %s for save_op",
var_name); var_name);
......
...@@ -24,7 +24,7 @@ class Checkpoint { ...@@ -24,7 +24,7 @@ class Checkpoint {
public: public:
static void Save(const framework::Scope& scope, const platform::Place& place, static void Save(const framework::Scope& scope, const platform::Place& place,
const std::string& save_dir, const std::string& var_name, const std::string& save_dir, const std::string& var_name,
const bool overwrite); const bool& overwrite);
static void Load(); static void Load();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册