From d91e500592790f1ef22ebfe921f273a61ff6252f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 20 Jun 2015 18:19:02 +0200 Subject: o Fixing typos. --- apps/sm-get-value.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/sm-get-value.cpp b/apps/sm-get-value.cpp index b813121..883495a 100644 --- a/apps/sm-get-value.cpp +++ b/apps/sm-get-value.cpp @@ -93,13 +93,14 @@ public: ~sm_get_value() = default; void add_options(po::options_description_easy_init &options) override { + auto default_sleep = po::value<>(&sleepTime)->default_value(0); + options("help", "produce help message") ("device", po::value()->required(), "MAC of device to poll") ("sensor", po::value>(&sensors)->multitoken(), "Sensor to poll, defaults to all") - ("sleep", po::value(&sleepTime)->default_value(0), - "How long to sleep in seconds between each poll. If not give, it will exit after first poll") - ("format", po::value(&format)->default_value(sample_format_type::KEY_VALUE), "Output format"); - + ("sleep", default_sleep, "How long to sleep in seconds between each poll. If not given, it will exit after first poll") + ("format", po::value(&format)->default_value(sample_format_type::KEY_VALUE), + "Output format"); } int main(app_execution &execution) override { @@ -147,8 +148,6 @@ public: return EXIT_FAILURE; } } - - }; } -- cgit v1.2.3