Apply clang-format to example code

This commit is contained in:
Martchus 2021-12-21 01:08:00 +01:00
parent e4c9e9be31
commit 330e67844d
1 changed files with 9 additions and 8 deletions

View File

@ -21,13 +21,15 @@ void example()
auto diag = Diagnostics(); auto diag = Diagnostics();
// create handle to abort gracefully and get feedback during during long operations // create handle to abort gracefully and get feedback during during long operations
auto progress = AbortableProgressFeedback([] (AbortableProgressFeedback &feedback) { auto progress = AbortableProgressFeedback(
// callback for status update [](AbortableProgressFeedback &feedback) {
std::clog << "At step: " << feedback.step() << '\n'; // callback for status update
}, [] (AbortableProgressFeedback &feedback) { std::clog << "At step: " << feedback.step() << '\n';
// callback for percentage-only updates },
std::clog << "Step percentage: " << feedback.stepPercentage() << '\n'; [](AbortableProgressFeedback &feedback) {
}); // callback for percentage-only updates
std::clog << "Step percentage: " << feedback.stepPercentage() << '\n';
});
// open file (might throw ios_base::failure) // open file (might throw ios_base::failure)
fileInfo.setPath("/path/to/some/file"sv); fileInfo.setPath("/path/to/some/file"sv);
@ -85,4 +87,3 @@ void example()
fileInfo.parseEverything(diag, progress); fileInfo.parseEverything(diag, progress);
fileInfo.applyChanges(diag, progress); fileInfo.applyChanges(diag, progress);
} }