[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: Fixing tag_t copy constructor and op
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: Fixing tag_t copy constructor and operator= bug which results in pmt_t's boost::intrusive_ptr counter being shallow copied. |
Date: |
Thu, 1 Dec 2016 16:02:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 925ecdd9d2b5c6a7706b25e8244a2110ecb78e34
Author: Darek Kawamoto <address@hidden>
Date: Mon Nov 28 17:16:36 2016 -0500
Fixing tag_t copy constructor and operator= bug which results in pmt_t's
boost::intrusive_ptr counter being shallow copied.
---
gnuradio-runtime/include/gnuradio/tags.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnuradio-runtime/include/gnuradio/tags.h
b/gnuradio-runtime/include/gnuradio/tags.h
index 0551e46..df65e50 100644
--- a/gnuradio-runtime/include/gnuradio/tags.h
+++ b/gnuradio-runtime/include/gnuradio/tags.h
@@ -69,6 +69,24 @@ namespace gr {
{
}
+ tag_t(const tag_t &rhs)
+ : offset(rhs.offset),
+ key(rhs.key),
+ value(rhs.value),
+ srcid(rhs.srcid)
+ {
+ }
+ tag_t& operator=(const tag_t &rhs)
+ {
+ if (this != &rhs) {
+ offset = rhs.offset;
+ key = rhs.key;
+ value = rhs.value;
+ srcid = rhs.srcid;
+ }
+ return (*this);
+ }
+
~tag_t()
{
}