From 52d0fe67f8998b215a47ebc697600cae49a7b17a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 22 Mar 2015 18:20:38 +0100 Subject: o Better class names for options. --- sensor/main/io.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sensor/main') 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 stream, KeyDictionary &dict, const SampleKey *timestamp_key, o output_fields) - : +RrdSampleOutputStream::RrdSampleOutputStream(shared_ptr stream, + KeyDictionary &dict, + const SampleKey *timestamp_key, + o 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 open_sample_output_stream( } else if (type == sample_format_type::JSON) { return make_unique(output, dict); } else if (type == sample_format_type::RRD) { - o of = find_option(options); + o of = find_option(options); - o tsf = find_option(options); + o tsf = find_option(options); auto timestamp_key = dict.indexOf(tsf ? tsf.get()->name : "timestamp"); -- cgit v1.2.3