diff options
author | Vijay Vasudevan <vrv@google.com> | 2016-06-16 18:04:10 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-06-16 19:16:41 -0700 |
commit | 209c006578483460e98c114a69d4b9ed6b95efed (patch) | |
tree | 0d0fa06e6472beea7291a2ea7bedc562e0a7f6dc /tensorflow/core/util/reporter.cc | |
parent | 92753d80cf09efd6e9b9156e7ad08b3203214cec (diff) |
TensorFlow: minor change functions in Env interface.
Switches to return a std::unique_ptr<> to convey transfer of ownership.
Keeps existing functions temporarily for backwards compatibility.
Change file_system.h interface to switch entirely to the new interface,
change all callers. If this breaks someone in the public, the interface
change should be straightforward.
Change: 125127028
Diffstat (limited to 'tensorflow/core/util/reporter.cc')
-rw-r--r-- | tensorflow/core/util/reporter.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tensorflow/core/util/reporter.cc b/tensorflow/core/util/reporter.cc index 0cffcc2c93..a7e4b48175 100644 --- a/tensorflow/core/util/reporter.cc +++ b/tensorflow/core/util/reporter.cc @@ -58,10 +58,8 @@ Status TestReporter::Initialize() { return errors::InvalidArgument("Cannot create TestReporter, file exists: ", mangled_fname); } - WritableFile* log_file; - TF_RETURN_IF_ERROR(env->NewWritableFile(mangled_fname, &log_file)); - log_file_.reset(log_file); - TF_RETURN_IF_ERROR(log_file->Flush()); + TF_RETURN_IF_ERROR(env->NewWritableFile(mangled_fname, &log_file_)); + TF_RETURN_IF_ERROR(log_file_->Flush()); benchmark_entry_.set_name(test_name_); closed_ = false; |