diff 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"); |