diff --git a/paddle/fluid/inference/io.cc b/paddle/fluid/inference/io.cc index 9c37e0178a3e660008dfa7004877f6261c5e00b7..734b220a1d3cf9f49b11af5d87371046a033da3f 100644 --- a/paddle/fluid/inference/io.cc +++ b/paddle/fluid/inference/io.cc @@ -24,7 +24,7 @@ limitations under the License. */ namespace paddle { namespace inference { -void Init(std::vector &argv) { framework::Init(argv); } +void Init(const std::vector argv) { framework::Init(argv); } void ReadBinaryFile(const std::string& filename, std::string* contents) { std::ifstream fin(filename, std::ios::in | std::ios::binary); diff --git a/paddle/fluid/inference/io.h b/paddle/fluid/inference/io.h index 799693b0c5d846dce762af1f636ebfbecad80f85..caf599b1a68783f155cd134c2a29e9ffa49a0895 100644 --- a/paddle/fluid/inference/io.h +++ b/paddle/fluid/inference/io.h @@ -25,7 +25,7 @@ limitations under the License. */ namespace paddle { namespace inference { -void Init(std::vector &argv); +void Init(const std::vector argv); void LoadPersistables(framework::Executor* executor, framework::Scope* scope, const framework::ProgramDesc& main_program,