diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-19 20:02:00 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-19 20:02:00 +0200 |
commit | 0374af511d7efdb856af372f126e66e5a78841d7 (patch) | |
tree | b63444108dbccf7ce1ddd3c0bb8ab9ac4f1aebaa /apps/ble-scan.h | |
parent | bfcc6e18af33d21ae3ae23def873fa6415045bec (diff) | |
download | ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.gz ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.bz2 ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.xz ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.zip |
o Applying clang-format to all apps.
Diffstat (limited to 'apps/ble-scan.h')
-rw-r--r-- | apps/ble-scan.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/ble-scan.h b/apps/ble-scan.h index 9a72388..2c183e3 100644 --- a/apps/ble-scan.h +++ b/apps/ble-scan.h @@ -17,11 +17,9 @@ static std::function<void(int)> onSignal; static void signal_handler(int signal) { onSignal(signal); } - } class ble_scan : public app { - public: ble_scan() : app("ble-scan") { } @@ -29,8 +27,7 @@ public: ~ble_scan() = default; void add_options(po::options_description_easy_init &options) override { - options - ("adapter", po::value<int>()->default_value(0), "Which adapter to use."); + options("adapter", po::value<int>()->default_value(0), "Which adapter to use."); } int main(app_execution &execution) override { @@ -39,9 +36,7 @@ public: struct sigaction sigIntHandler; - ble_scan_utils::onSignal = [&](int signal) { - adapter->stopScan(); - }; + ble_scan_utils::onSignal = [&](int signal) { adapter->stopScan(); }; sigIntHandler.sa_handler = &ble_scan_utils::signal_handler; sigemptyset(&sigIntHandler.sa_mask); @@ -68,9 +63,7 @@ public: cout << "Stopped. Found " << seen_devices.size() << " devices." << endl; - for_each(begin(seen_devices), end(seen_devices), [&](auto mac) { - cout << mac.str() << endl; - }); + for_each(begin(seen_devices), end(seen_devices), [&](auto mac) { cout << mac.str() << endl; }); return EXIT_SUCCESS; } catch (std::runtime_error ex) { @@ -82,6 +75,5 @@ public: } } }; - } } |