From 738b08ce6b9f80d93b815411b47c2b11c2f090f6 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 1 Mar 2016 14:45:20 -0500 Subject: Fix and enable lint checks. This CL fixes and enables: * readability/namespace * readability/multiline_string * readability/multiline_comment * readability/inheritance * readability/function * readability/braces R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747123002 . --- samples/image_diff_png.cc | 2 +- samples/pdfium_test.cc | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'samples') diff --git a/samples/image_diff_png.cc b/samples/image_diff_png.cc index 09913fbe4a..93823aa431 100644 --- a/samples/image_diff_png.cc +++ b/samples/image_diff_png.cc @@ -641,4 +641,4 @@ bool EncodeBGRAPNG(const unsigned char* input, std::vector(), output); } -} // image_diff_png +} // namespace image_diff_png diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index fe25c7e6cd..656e041e36 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -326,9 +326,8 @@ bool ParseCommandLine(const std::vector& args, return false; } options->font_directory = cur_arg.substr(11); - } #ifdef _WIN32 - else if (cur_arg == "--emf") { + } else if (cur_arg == "--emf") { if (options->output_format != OUTPUT_NONE) { fprintf(stderr, "Duplicate or conflicting --emf argument\n"); return false; @@ -340,20 +339,21 @@ bool ParseCommandLine(const std::vector& args, return false; } options->output_format = OUTPUT_BMP; - } #endif // _WIN32 + #ifdef PDF_ENABLE_V8 #ifdef V8_USE_EXTERNAL_STARTUP_DATA - else if (cur_arg.size() > 10 && cur_arg.compare(0, 10, "--bin-dir=") == 0) { + } else if (cur_arg.size() > 10 && + cur_arg.compare(0, 10, "--bin-dir=") == 0) { if (!options->bin_directory.empty()) { fprintf(stderr, "Duplicate --bin-dir argument\n"); return false; } options->bin_directory = cur_arg.substr(10); - } #endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // PDF_ENABLE_V8 - else if (cur_arg.size() > 8 && cur_arg.compare(0, 8, "--scale=") == 0) { + + } else if (cur_arg.size() > 8 && cur_arg.compare(0, 8, "--scale=") == 0) { if (!options->scale_factor_as_string.empty()) { fprintf(stderr, "Duplicate --scale argument\n"); return false; @@ -362,8 +362,9 @@ bool ParseCommandLine(const std::vector& args, } else if (cur_arg.size() >= 2 && cur_arg[0] == '-' && cur_arg[1] == '-') { fprintf(stderr, "Unrecognized argument %s\n", cur_arg.c_str()); return false; - } else + } else { break; + } } for (size_t i = cur_idx; i < args.size(); i++) { files->push_back(args[i]); -- cgit v1.2.3