summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2014-06-18 15:50:07 +0200
committerTom Rondeau <tom@trondeau.com>2014-06-26 14:37:13 -0400
commit95b66d6656ba4f23dd160412b4c34d0234e0198a (patch)
tree128ef9c298e379c4858a8598337dfeac3a21a6f9
parent93aea30efd828373b9366ef97e1bb853d85d87e8 (diff)
tag_checker.h: fix unitialized d_has_next_tag; coverity 1128348
keeping style-compatible with the original file, just to keep the commit small
-rw-r--r--gnuradio-runtime/include/gnuradio/tag_checker.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gnuradio-runtime/include/gnuradio/tag_checker.h b/gnuradio-runtime/include/gnuradio/tag_checker.h
index f6f73bba95..a5616b2f1d 100644
--- a/gnuradio-runtime/include/gnuradio/tag_checker.h
+++ b/gnuradio-runtime/include/gnuradio/tag_checker.h
@@ -30,14 +30,21 @@ namespace gr {
class tag_checker
{
+ private:
+ std::vector<tag_t> d_tags;
+ tag_t d_next_tag;
+ unsigned int d_next_tag_index;
+ bool d_has_next_tag;
+
public:
- tag_checker(std::vector<tag_t> &tags)
+ tag_checker(std::vector<tag_t> &tags):
+ d_has_next_tag(false),
+ d_next_tag_index(0)
{
d_tags = tags;
std::sort(d_tags.begin(), d_tags.end(), &gr::tag_t::offset_compare);
if(d_tags.size() > 0) {
d_has_next_tag = true;
- d_next_tag_index = 0;
d_next_tag = tags[0];
}
};
@@ -60,11 +67,6 @@ namespace gr {
}
};
- private:
- std::vector<tag_t> d_tags;
- tag_t d_next_tag;
- unsigned int d_next_tag_index;
- bool d_has_next_tag;
};
}