X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fdecoder.cpp;fp=pv%2Fdata%2Fdecode%2Fdecoder.cpp;h=e6fe82d22a092d7e663a06e813ab52a4aac908da;hp=0f12fec8bd753024c53c859f4a44427bfb7a5f81;hb=761f8302350c52f2cf357f49e1084e7101c70497;hpb=273798599b8be55a7ed9bbc99077b3478a094aec 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();