diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-11 22:38:14 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-11 22:38:14 +0200 |
| commit | 11c94137d9432698954c0e7b53208ddeb929efcf (patch) | |
| tree | cdc47d3e1a9f4cc81c22d55d1a449db8b2dcdbad | |
| parent | 3005571cd08c3bdd233fd073b6ae956b9d98b570 (diff) | |
Cleanup: use some lambdas.
| -rw-r--r-- | tools/dcpverify.cc | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/tools/dcpverify.cc b/tools/dcpverify.cc index f29393ed..4d670b8e 100644 --- a/tools/dcpverify.cc +++ b/tools/dcpverify.cc @@ -60,25 +60,6 @@ help (string n) << " -q, --quiet don't report progress\n"; } -void -stage (bool quiet, string s, optional<boost::filesystem::path> path) -{ - if (quiet) { - return; - } - - if (path) { - cout << s << ": " << path->string() << "\n"; - } else { - cout << s << "\n"; - } -} - -void -progress () -{ - -} int main (int argc, char* argv[]) @@ -135,9 +116,23 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } + auto stage = [quiet](string s, optional<boost::filesystem::path> path) { + if (quiet) { + return; + } + + if (path) { + cout << s << ": " << path->string() << "\n"; + } else { + cout << s << "\n"; + } + }; + + auto progress = [](float) {}; + vector<boost::filesystem::path> directories; directories.push_back (argv[optind]); - auto notes = dcp::verify (directories, bind(&stage, quiet, _1, _2), bind(&progress)); + auto notes = dcp::verify(directories, stage, progress); dcp::filter_notes (notes, ignore_missing_assets); bool failed = false; |
