X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Frowdata.cpp;h=0434e1c0d8aad7a2d93e2ecf26555377ff6fb62f;hp=fc635b2452db765e7bd8896b6d6e6c474abc36da;hb=88a2597864920ecdbe66cf0cd4b8172bdabb2263;hpb=ae30ff422a495a6b1a4ad2893566628863ea222b diff --git a/pv/data/decode/rowdata.cpp b/pv/data/decode/rowdata.cpp index fc635b24..0434e1c0 100644 --- a/pv/data/decode/rowdata.cpp +++ b/pv/data/decode/rowdata.cpp @@ -95,13 +95,21 @@ void RowData::get_annotation_subset( } } +const deque& RowData::annotations() const +{ + return annotations_; +} + const Annotation* RowData::emplace_annotation(srd_proto_data *pdata) { const srd_proto_data_annotation *const pda = (const srd_proto_data_annotation*)pdata->data; Annotation::Class ann_class_id = (Annotation::Class)(pda->ann_class); - // Look up the longest annotation text to see if we have it in storage + // Look up the longest annotation text to see if we have it in storage. + // This implies that if the longest text is the same, the shorter texts + // are expected to be the same, too. PDs that violate this assumption + // should be considered broken. const char* const* ann_texts = (char**)pda->ann_text; const QString ann0 = QString::fromUtf8(ann_texts[0]); vector* storage_entry = &(ann_texts_[ann0]);