summaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-10 12:54:40 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-10 12:54:40 +0200
commitb042d58100282b480834b283fb40f3b5390327e8 (patch)
tree7e189f7044d9581cfcdd42a7a743db80b2115daa /src/DabMod.cpp
parent5c3d2648abaedc18e36f2ba99bd70aec0df3b1be (diff)
downloaddabmod-b042d58100282b480834b283fb40f3b5390327e8.tar.gz
dabmod-b042d58100282b480834b283fb40f3b5390327e8.tar.bz2
dabmod-b042d58100282b480834b283fb40f3b5390327e8.zip
Use make_shared in DabMod.cpp
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 304d252..b713d30 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -726,22 +726,22 @@ int main(int argc, char* argv[])
if (useFileOutput) {
if (fileOutputFormat == "complexf") {
- output = shared_ptr<OutputFile>(new OutputFile(outputName));
+ output = make_shared<OutputFile>(outputName);
}
else if (fileOutputFormat == "s8") {
// We must normalise the samples to the interval [-127.0; 127.0]
normalise = 127.0f / normalise_factor;
- format_converter = shared_ptr<FormatConverter>(new FormatConverter());
+ format_converter = make_shared<FormatConverter>();
- output = shared_ptr<OutputFile>(new OutputFile(outputName));
+ output = make_shared<OutputFile>(outputName);
}
}
#if defined(HAVE_OUTPUT_UHD)
else if (useUHDOutput) {
normalise = 1.0f / normalise_factor;
outputuhd_conf.sampleRate = outputRate;
- output = shared_ptr<OutputUHD>(new OutputUHD(outputuhd_conf, logger));
+ output = make_shared<OutputUHD>(outputuhd_conf, &logger);
((OutputUHD*)output.get())->enrol_at(rcs);
}
#endif
@@ -808,8 +808,7 @@ int main(int argc, char* argv[])
run_again = true;
// Create a new input reader
- inputZeroMQReader = shared_ptr<InputZeroMQReader>(
- new InputZeroMQReader(logger));
+ inputZeroMQReader = make_shared<InputZeroMQReader>(logger);
inputZeroMQReader->Open(inputName, inputMaxFramesQueued);
m.inputReader = inputZeroMQReader.get();
}