aboutsummaryrefslogtreecommitdiff
path: root/apps/sm-serial-read.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-17 22:56:47 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-17 22:56:47 +0100
commit7edc4328bfd5eee557108ebdb4243ca06914c41e (patch)
treefd01761ed57c6f5d31409c7777b4c0c127a1e482 /apps/sm-serial-read.cpp
parent5d6e4c971857b5e05d7c277e7eafcb9d64dbc6a7 (diff)
downloadble-toys-7edc4328bfd5eee557108ebdb4243ca06914c41e.tar.gz
ble-toys-7edc4328bfd5eee557108ebdb4243ca06914c41e.tar.bz2
ble-toys-7edc4328bfd5eee557108ebdb4243ca06914c41e.tar.xz
ble-toys-7edc4328bfd5eee557108ebdb4243ca06914c41e.zip
o cout and unique_ptr became complicated.
o Updating lots of code to the latest api.
Diffstat (limited to 'apps/sm-serial-read.cpp')
-rw-r--r--apps/sm-serial-read.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/sm-serial-read.cpp b/apps/sm-serial-read.cpp
index c52e7f9..0d0bfe6 100644
--- a/apps/sm-serial-read.cpp
+++ b/apps/sm-serial-read.cpp
@@ -123,14 +123,14 @@ public:
}
shared_ptr<SampleOutputStream> output;
- unique_ptr<ostream> outputStream = unique_ptr<ostream>(&cout);
+ shared_ptr<ostream> outputStream = shared_ptr<ostream>(&cout, noop_deleter);
if (format == Format::JSON) {
- output = make_shared<JsonSampleOutputStream>(std::move(outputStream), dict);
+ output = make_shared<JsonSampleOutputStream>(outputStream, dict);
} else if (format == Format::SQL) {
- output = make_shared<SqlSampleOutputStream>(std::move(outputStream), dict, "raw");
+ output = make_shared<SqlSampleOutputStream>(outputStream, dict, "raw");
} else if (format == Format::PLAIN) {
- output = make_shared<CsvSampleOutputStream>(std::move(outputStream), dict);
+ output = make_shared<CsvSampleOutputStream>(outputStream, dict);
} else {
cerr << "Unsupported format: " << boost::lexical_cast<string>(format) << endl;
return EXIT_FAILURE;