summaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-14 16:39:38 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-14 16:39:38 +0200
commitd4cf5339da32900d90c6d2dd6fea3c0747140dc8 (patch)
tree13a3dfff0e6718858333f16e4e80303209d14619 /src/TimestampDecoder.cpp
parent39691b7bed013e228cbe75d4b9feaa617e0f08e4 (diff)
downloaddabmod-d4cf5339da32900d90c6d2dd6fea3c0747140dc8.tar.gz
dabmod-d4cf5339da32900d90c6d2dd6fea3c0747140dc8.tar.bz2
dabmod-d4cf5339da32900d90c6d2dd6fea3c0747140dc8.zip
Replace pointer in TimestampDecoder by shared_ptr
Diffstat (limited to 'src/TimestampDecoder.cpp')
-rw-r--r--src/TimestampDecoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp
index b03ecbb..5044366 100644
--- a/src/TimestampDecoder.cpp
+++ b/src/TimestampDecoder.cpp
@@ -29,6 +29,7 @@
#include <fstream>
#include <string>
#include <boost/lexical_cast.hpp>
+#include <boost/make_shared.hpp>
#include <sys/types.h>
#include "PcDebug.h"
#include "TimestampDecoder.h"
@@ -41,7 +42,8 @@
void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts)
{
- struct frame_timestamp* ts_queued = new struct frame_timestamp;
+ boost::shared_ptr<struct frame_timestamp> ts_queued =
+ boost::make_shared<struct frame_timestamp>();
/* Push new timestamp into queue */
ts_queued->timestamp_valid = full_timestamp_received_mnsc;
@@ -87,8 +89,6 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts)
ts.timestamp_sec,
ts.timestamp_pps_offset,
ts.timestamp_refresh);*/
-
- delete ts_queued;
}
MDEBUG("Timestamp queue size %zu, delay_calc %u\n",