diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-05-31 13:45:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-31 13:49:26 -0700 |
commit | 6882effb863dcd0da00d3287959deac46734a0b2 (patch) | |
tree | 75364d9f41109003d318dd1e50a73988e9229d5d /tensorflow/core/lib/io | |
parent | 0b8070253d6c62ad395a42c3f496c3f21ae5d975 (diff) |
Make single-parameter constructors explicit
PiperOrigin-RevId: 157628970
Diffstat (limited to 'tensorflow/core/lib/io')
-rw-r--r-- | tensorflow/core/lib/io/inputstream_interface_test.cc | 2 | ||||
-rw-r--r-- | tensorflow/core/lib/io/iterator.cc | 2 | ||||
-rw-r--r-- | tensorflow/core/lib/io/table_test.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/core/lib/io/inputstream_interface_test.cc b/tensorflow/core/lib/io/inputstream_interface_test.cc index 09d5d74869..43c4c55b7a 100644 --- a/tensorflow/core/lib/io/inputstream_interface_test.cc +++ b/tensorflow/core/lib/io/inputstream_interface_test.cc @@ -25,7 +25,7 @@ namespace { class TestStringStream : public InputStreamInterface { public: - TestStringStream(const string& content) : content_(content) {} + explicit TestStringStream(const string& content) : content_(content) {} Status ReadNBytes(int64 bytes_to_read, string* result) override { result->clear(); diff --git a/tensorflow/core/lib/io/iterator.cc b/tensorflow/core/lib/io/iterator.cc index 60f9981c2f..50eaa50b5c 100644 --- a/tensorflow/core/lib/io/iterator.cc +++ b/tensorflow/core/lib/io/iterator.cc @@ -53,7 +53,7 @@ void Iterator::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) { namespace { class EmptyIterator : public Iterator { public: - EmptyIterator(const Status& s) : status_(s) {} + explicit EmptyIterator(const Status& s) : status_(s) {} bool Valid() const override { return false; } void Seek(const StringPiece& target) override {} void SeekToFirst() override {} diff --git a/tensorflow/core/lib/io/table_test.cc b/tensorflow/core/lib/io/table_test.cc index 31100906e5..78a3fa501c 100644 --- a/tensorflow/core/lib/io/table_test.cc +++ b/tensorflow/core/lib/io/table_test.cc @@ -109,7 +109,7 @@ class StringSink : public WritableFile { class StringSource : public RandomAccessFile { public: - StringSource(const StringPiece& contents) + explicit StringSource(const StringPiece& contents) : contents_(contents.data(), contents.size()), bytes_read_(0) {} ~StringSource() override {} |