X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fdata%2Fdecode%2Fdecoder.cpp;h=e6fe82d22a092d7e663a06e813ab52a4aac908da;hb=761f8302350c52f2cf357f49e1084e7101c70497;hp=0f12fec8bd753024c53c859f4a44427bfb7a5f81;hpb=feda6c6bbde575242cf01c769c0ecd3e89f9f7a0;p=pulseview.git diff --git a/pv/data/decode/decoder.cpp b/pv/data/decode/decoder.cpp index 0f12fec8..e6fe82d2 100644 --- a/pv/data/decode/decoder.cpp +++ b/pv/data/decode/decoder.cpp @@ -264,6 +264,14 @@ AnnotationClass* Decoder::get_ann_class_by_id(size_t id) return &(ann_classes_[id]); } +const AnnotationClass* Decoder::get_ann_class_by_id(size_t id) const +{ + if (id >= ann_classes_.size()) + return nullptr; + + return &(ann_classes_[id]); +} + uint32_t Decoder::get_binary_class_count() const { return bin_classes_.size();