diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-05-30 10:52:47 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-30 10:56:18 -0700 |
commit | 7280dafca161eb3413ea120d3dd07c63e5254e72 (patch) | |
tree | 7e14a2994ce2fd68ce5e58d0dd0b5960cf1f93d9 /tensorflow/core/common_runtime/session_state.cc | |
parent | 6c3b15915d7475aed4484e47361e7cd0871678f4 (diff) |
Use "empty" member function to test for emptiness
PiperOrigin-RevId: 157483181
Diffstat (limited to 'tensorflow/core/common_runtime/session_state.cc')
-rw-r--r-- | tensorflow/core/common_runtime/session_state.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/session_state.cc b/tensorflow/core/common_runtime/session_state.cc index 7e7200070d..6befa53dff 100644 --- a/tensorflow/core/common_runtime/session_state.cc +++ b/tensorflow/core/common_runtime/session_state.cc @@ -66,7 +66,7 @@ Status TensorStore::AddTensor(const string& name, const TensorAndKey& tk) { Status TensorStore::SaveTensors(const std::vector<string>& output_names, SessionState* session_state) { mutex_lock l(lock_); - if (tensors_.size() != 0) { + if (!tensors_.empty()) { // Save only the tensors in output_names in the session. for (const string& name : output_names) { TensorId id(ParseTensorName(name)); |