diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-22 18:20:38 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-22 18:20:38 +0100 |
commit | 52d0fe67f8998b215a47ebc697600cae49a7b17a (patch) | |
tree | 18da6306fde41ae9707f658ef2ddd14ced5de882 /sensor/main | |
parent | ec15f36073b77375a06457c423d9a56245aa9dfc (diff) | |
download | ble-toys-52d0fe67f8998b215a47ebc697600cae49a7b17a.tar.gz ble-toys-52d0fe67f8998b215a47ebc697600cae49a7b17a.tar.bz2 ble-toys-52d0fe67f8998b215a47ebc697600cae49a7b17a.tar.xz ble-toys-52d0fe67f8998b215a47ebc697600cae49a7b17a.zip |
o Better class names for options.
Diffstat (limited to 'sensor/main')
-rw-r--r-- | sensor/main/io.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sensor/main/io.cpp b/sensor/main/io.cpp index 4837414..57c0b18 100644 --- a/sensor/main/io.cpp +++ b/sensor/main/io.cpp @@ -186,9 +186,12 @@ void KeyValueSampleOutputStream::write(SampleRecord const &sample) { *stream.get() << endl; } -RrdSampleOutputStream::RrdSampleOutputStream(shared_ptr<ostream> stream, KeyDictionary &dict, const SampleKey *timestamp_key, o<output_fields *> output_fields) - : +RrdSampleOutputStream::RrdSampleOutputStream(shared_ptr<ostream> stream, + KeyDictionary &dict, + const SampleKey *timestamp_key, + o<output_fields_option *> output_fields) : stream(move(stream)), timestamp_key(timestamp_key) { + if (output_fields) { for (auto field : output_fields.get()->fields) { keys.emplace_back(dict.indexOf(field)); @@ -399,9 +402,9 @@ unique_ptr<SampleOutputStream> open_sample_output_stream( } else if (type == sample_format_type::JSON) { return make_unique<JsonSampleOutputStream>(output, dict); } else if (type == sample_format_type::RRD) { - o<output_fields *> of = find_option<output_fields>(options); + o<output_fields_option *> of = find_option<output_fields_option>(options); - o<timestamp_field *> tsf = find_option<timestamp_field>(options); + o<timestamp_field_option *> tsf = find_option<timestamp_field_option>(options); auto timestamp_key = dict.indexOf(tsf ? tsf.get()->name : "timestamp"); |