summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-11-22 20:04:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-22 20:04:12 +0000
commitfe2cd4d914205f2da91286e7270209e2016d51a1 (patch)
tree50c8f98c7daf38df965f83e29a382fd95434195d /samples/pdfium_test.cc
parentd328d91f9e7a49f0d79048a7d10be9ba17ad9cb2 (diff)
downloadpdfium-fe2cd4d914205f2da91286e7270209e2016d51a1.tar.xz
Remove some pointless assignments to "".
Or change them to clear(). Change-Id: Ia9e3e1f0d74b948cec3f8df85d205f830ac9216c Reviewed-on: https://pdfium-review.googlesource.com/19172 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc4
1 files changed, 2 insertions, 2 deletions
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<const char*>(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");