]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/rowdata.cpp
Fix #977 properly by checking whether a row actually has annotations
[pulseview.git] / pv / data / decode / rowdata.cpp
index 2a26169eb6cc0f14adb5a107726c40ee891838b6..d3d14f9bd56fb7d2b3c275f5185775ca12dceab8 100644 (file)
@@ -32,6 +32,11 @@ uint64_t RowData::get_max_sample() const
        return annotations_.back().end_sample();
 }
 
+uint64_t RowData::get_annotation_count() const
+{
+       return annotations_.size();
+}
+
 void RowData::get_annotation_subset(
        vector<pv::data::decode::Annotation> &dest,
        uint64_t start_sample, uint64_t end_sample) const