diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-05-30 12:39:24 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-30 12:42:57 -0700 |
commit | dcc3cdce8d44b9eb6b105ec7e770e297bacfc215 (patch) | |
tree | 821f91a360cb711770fa512f9f786abc284b8eb5 /tensorflow/core/lib/jpeg | |
parent | af2b9d8757014519e26c0dc9750812dc8c47b2f5 (diff) |
Remove redundant get() calls and string conversions
PiperOrigin-RevId: 157497932
Diffstat (limited to 'tensorflow/core/lib/jpeg')
-rw-r--r-- | tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc b/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc index 3d3050cd0d..cc8646750e 100644 --- a/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc +++ b/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc @@ -71,17 +71,17 @@ void TestJPEG(Env* env, const string& jpegfile) { // Set min_acceptable_fraction to something insufficient flags.min_acceptable_fraction = 0.8; imgdata.reset(Uncompress(temp, fsize / 2, flags, &w, &h, &c, nullptr)); - CHECK(imgdata.get() == nullptr); + CHECK(imgdata == nullptr); // Now, use a value that makes fsize/2 be enough for a black-filling flags.min_acceptable_fraction = 0.01; imgdata.reset(Uncompress(temp, fsize / 2, flags, &w, &h, &c, nullptr)); - CHECK(imgdata.get() != nullptr); + CHECK(imgdata != nullptr); // Finally, uncompress the whole data flags.min_acceptable_fraction = 1.0; imgdata.reset(Uncompress(temp, fsize, flags, &w, &h, &c, nullptr)); - CHECK(imgdata.get() != nullptr); + CHECK(imgdata != nullptr); } TEST(JpegMemTest, Jpeg) { @@ -267,7 +267,7 @@ TEST(JpegMemTest, ChromaDownsampling) { int64 num_warnings; std::unique_ptr<uint8[]> uncompressed(Uncompress( jpeg.c_str(), jpeg.size(), unflags, &w, &h, &c, &num_warnings)); - CHECK(uncompressed.get() != nullptr); + CHECK(uncompressed != nullptr); CHECK_EQ(num_warnings, 0); // Recompress the JPEG with and without chroma downsampling |