From 60965d5f4d608bdccc2ffd4e8753e12cbbbd71d2 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 21 May 2023 13:35:09 -0400 Subject: Rerun clang-format --- examples/pdf-bookmarks.cc | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'examples/pdf-bookmarks.cc') diff --git a/examples/pdf-bookmarks.cc b/examples/pdf-bookmarks.cc index 8128fed1..d40ded6a 100644 --- a/examples/pdf-bookmarks.cc +++ b/examples/pdf-bookmarks.cc @@ -23,16 +23,12 @@ static std::map page_map; void usage() { - std::cerr - << "Usage: " << whoami << " [options] file.pdf [password]" << std::endl - << "Options:" << std::endl - << " --numbers give bookmarks outline-style numbers" - << std::endl - << " --lines draw lines to show bookmark hierarchy" - << std::endl - << " --show-open indicate whether a bookmark is initially open" - << std::endl - << " --show-targets show target if possible" << std::endl; + std::cerr << "Usage: " << whoami << " [options] file.pdf [password]" << std::endl + << "Options:" << std::endl + << " --numbers give bookmarks outline-style numbers" << std::endl + << " --lines draw lines to show bookmark hierarchy" << std::endl + << " --show-open indicate whether a bookmark is initially open" << std::endl + << " --show-targets show target if possible" << std::endl; exit(2); } @@ -120,16 +116,14 @@ show_bookmark_details(QPDFOutlineObjectHelper outline, std::vector numbers) } void -extract_bookmarks( - std::vector outlines, std::vector& numbers) +extract_bookmarks(std::vector outlines, std::vector& numbers) { // For style == st_numbers, numbers.at(n) contains the numerical // label for the outline, so we count up from 1. // For style == st_lines, numbers.at(n) == 0 indicates the last // outline at level n, and we don't otherwise care what the value // is, so we count up to zero. - numbers.push_back( - (style == st_lines) ? -QIntC::to_int(outlines.size()) : 0); + numbers.push_back((style == st_lines) ? -QIntC::to_int(outlines.size()) : 0); for (auto& outline: outlines) { ++(numbers.back()); show_bookmark_details(outline, numbers); @@ -196,8 +190,7 @@ main(int argc, char* argv[]) std::cout << filename << " has no bookmarks" << std::endl; } } catch (std::exception& e) { - std::cerr << whoami << " processing file " << filename << ": " - << e.what() << std::endl; + std::cerr << whoami << " processing file " << filename << ": " << e.what() << std::endl; exit(2); } -- cgit v1.2.3-54-g00ecf