From 7b7fe01cae07393430d6f3062497dff19233eeba Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Tue, 4 Dec 2018 16:58:02 +0800 Subject: [PATCH] optimize code --- paddle/fluid/operators/reader/ctr_reader.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/reader/ctr_reader.cc b/paddle/fluid/operators/reader/ctr_reader.cc index 946f17750e1..65b300d152f 100644 --- a/paddle/fluid/operators/reader/ctr_reader.cc +++ b/paddle/fluid/operators/reader/ctr_reader.cc @@ -101,16 +101,16 @@ class GzipReader : public Reader { class PlainFileReader : public Reader { public: explicit PlainFileReader(const std::string& file_name) - : myfile_(file_name.c_str()) {} + : stream_(file_name.c_str()) {} ~PlainFileReader() {} - bool HasNext() override { return myfile_.peek() != EOF; } + bool HasNext() override { return stream_.peek() != EOF; } - void NextLine(std::string* line) override { std::getline(myfile_, *line); } + void NextLine(std::string* line) override { std::getline(stream_, *line); } private: - std::ifstream myfile_; + std::ifstream stream_; }; template -- GitLab