aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/memmapped_file_system_writer.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-05-30 10:52:47 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-30 10:56:18 -0700
commit7280dafca161eb3413ea120d3dd07c63e5254e72 (patch)
tree7e14a2994ce2fd68ce5e58d0dd0b5960cf1f93d9 /tensorflow/core/util/memmapped_file_system_writer.cc
parent6c3b15915d7475aed4484e47361e7cd0871678f4 (diff)
Use "empty" member function to test for emptiness
PiperOrigin-RevId: 157483181
Diffstat (limited to 'tensorflow/core/util/memmapped_file_system_writer.cc')
-rw-r--r--tensorflow/core/util/memmapped_file_system_writer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/util/memmapped_file_system_writer.cc b/tensorflow/core/util/memmapped_file_system_writer.cc
index 7e87f4539c..9556ee385f 100644
--- a/tensorflow/core/util/memmapped_file_system_writer.cc
+++ b/tensorflow/core/util/memmapped_file_system_writer.cc
@@ -41,7 +41,7 @@ Status MemmappedFileSystemWriter::SaveTensor(const Tensor& tensor,
" and include [A-Za-z0-9_.]");
}
const auto tensor_data = tensor.tensor_data();
- if (0 == tensor_data.size()) {
+ if (tensor_data.empty()) {
return errors::InvalidArgument(
"MemmappedEnvWritter: saving tensor with 0 size");
}