aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/memmapped_file_system_writer.cc
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2016-06-16 18:04:10 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-06-16 19:16:41 -0700
commit209c006578483460e98c114a69d4b9ed6b95efed (patch)
tree0d0fa06e6472beea7291a2ea7bedc562e0a7f6dc /tensorflow/core/util/memmapped_file_system_writer.cc
parent92753d80cf09efd6e9b9156e7ad08b3203214cec (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/memmapped_file_system_writer.cc')
-rw-r--r--tensorflow/core/util/memmapped_file_system_writer.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/tensorflow/core/util/memmapped_file_system_writer.cc b/tensorflow/core/util/memmapped_file_system_writer.cc
index c4d6fa0440..7e87f4539c 100644
--- a/tensorflow/core/util/memmapped_file_system_writer.cc
+++ b/tensorflow/core/util/memmapped_file_system_writer.cc
@@ -20,10 +20,8 @@ namespace tensorflow {
Status MemmappedFileSystemWriter::InitializeToFile(Env* env,
const string& filename) {
- WritableFile* writable_file;
- auto status = env->NewWritableFile(filename, &writable_file);
+ auto status = env->NewWritableFile(filename, &output_file_);
if (status.ok()) {
- output_file_.reset(writable_file);
output_file_offset_ = 0;
}
return status;