]> sigrok.org Git - pulseview.git/commit
DecoderSelector: Fix catching polymorphic types by value.
authorUwe Hermann <redacted>
Thu, 14 Mar 2019 20:22:47 +0000 (21:22 +0100)
committerUwe Hermann <redacted>
Thu, 14 Mar 2019 21:49:24 +0000 (22:49 +0100)
commit3d3eca621487bd58cfcf72cc6ed4f2b1274af735
treedc9ee0d349d4a410bac2b364be596d1002fad5f7
parent1fa702cf18e574e439ad20028203dd157cbc23bf
DecoderSelector: Fix catching polymorphic types by value.

  [...]/pv/subwindows/decoder_selector/item.cpp: In member function ‘std::shared_ptr<pv::subwindows::decoder_selector::DecoderCollectionItem> pv::subwindows::decoder_selector::DecoderCollectionItem::subItem(int) const’:
  [...]/pv/subwindows/decoder_selector/item.cpp:44:11: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
    } catch (out_of_range) {
             ^~~~~~~~~~~~
  [...]/pv/subwindows/decoder_selector/item.cpp: In member function ‘QVariant pv::subwindows::decoder_selector::DecoderCollectionItem::data(int) const’:
  [...]/pv/subwindows/decoder_selector/item.cpp:88:11: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
    } catch (out_of_range) {
             ^~~~~~~~~~~~
pv/subwindows/decoder_selector/item.cpp