From fe2cd4d914205f2da91286e7270209e2016d51a1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 22 Nov 2017 20:04:12 +0000 Subject: Remove some pointless assignments to "". Or change them to clear(). Change-Id: Ia9e3e1f0d74b948cec3f8df85d205f830ac9216c Reviewed-on: https://pdfium-review.googlesource.com/19172 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- samples/pdfium_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'samples') diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 644aee7819..bc0ad86297 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -1285,7 +1285,7 @@ bool RenderPage(const std::string& name, const char* buffer = reinterpret_cast(FPDFBitmap_GetBuffer(bitmap.get())); - std::string&& image_file_name = ""; + std::string image_file_name; switch (options.output_format) { #ifdef _WIN32 case OUTPUT_BMP: @@ -1335,7 +1335,7 @@ bool RenderPage(const std::string& name, // Write the filename and the MD5 of the buffer to stdout if we wrote a // file. - if (options.md5 && image_file_name != "") + if (options.md5 && !image_file_name.empty()) OutputMD5Hash(image_file_name.c_str(), buffer, stride * height); } else { fprintf(stderr, "Page was too large to be rendered.\n"); -- cgit v1.2.3