summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-11-14 10:47:43 +0100
committerRobin Gareus <robin@gareus.org>2014-11-14 11:30:08 +0100
commit6b3a8915f3c50f7220121fcb9202ec20144389c4 (patch)
tree08e7ae373859e5ca15b8fa0ca075b18b65915a22 /gtk2_ardour/selection.cc
parent5d5d9cb9e262498dc0831dc362fbcb3f92bcdb9f (diff)
add abort() to non-reached code
This cleans up a lot of false-positives in static analysis and also helps compilers to optimize code paths in general. (tagging the fatal stingstream operator as ‘noreturn’ is far less trivial)
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 507245eb3d..1bdc0fe8b0 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -1002,7 +1002,7 @@ Selection::toggle (list<Selectable*> const & selectables)
fatal << _("programming error: ")
<< X_("unknown selectable type passed to Selection::toggle()")
<< endmsg;
- /*NOTREACHED*/
+ abort(); /*NOTREACHED*/
}
}
@@ -1056,7 +1056,7 @@ Selection::add (list<Selectable*> const & selectables)
fatal << _("programming error: ")
<< X_("unknown selectable type passed to Selection::add()")
<< endmsg;
- /*NOTREACHED*/
+ abort(); /*NOTREACHED*/
}
}