summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-01 14:45:20 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-01 14:45:20 -0500
commit738b08ce6b9f80d93b815411b47c2b11c2f090f6 (patch)
treeec648b9bdf6d9597043bfe657d56f98dc3cdef30 /samples/pdfium_test.cc
parent50dfc4a7068e8e08105f7b9a3945136e7246e677 (diff)
downloadpdfium-738b08ce6b9f80d93b815411b47c2b11c2f090f6.tar.xz
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 .
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc15
1 files changed, 8 insertions, 7 deletions
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]);