diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/image_diff_png.cc | 2 | ||||
-rw-r--r-- | samples/pdfium_test.cc | 15 |
2 files changed, 9 insertions, 8 deletions
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<Comment>(), 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<std::string>& 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<std::string>& 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<std::string>& 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]); |