summaryrefslogtreecommitdiffstats
path: root/src/gui/BreadCrumbs.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-13 23:12:15 +0000
committerDavid Robillard <d@drobilla.net>2012-05-13 23:12:15 +0000
commitb731f5a51bbccdcc346add34eb6c04ac22941768 (patch)
tree2f22036acaa64cac24ad12befb09117b53ac0a3b /src/gui/BreadCrumbs.cpp
parenta77f8abd48020c23fa894cc0e0e24927696adf1e (diff)
downloadingen-b731f5a51bbccdcc346add34eb6c04ac22941768.tar.gz
ingen-b731f5a51bbccdcc346add34eb6c04ac22941768.tar.bz2
ingen-b731f5a51bbccdcc346add34eb6c04ac22941768.zip
Handle exception by reference.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4397 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/BreadCrumbs.cpp')
-rw-r--r--src/gui/BreadCrumbs.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index adc9526d..c6c776d5 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -62,8 +62,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
_enable_signal = false;
// Moving to a path we already contain, just switch the active button
- if (_breadcrumbs.size() > 0 && (path.is_parent_of(_full_path) || path == _full_path)) {
-
+ if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) {
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
if ((*i)->path() == path) {
(*i)->set_active(true);
@@ -82,7 +81,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
_enable_signal = old_enable_signal;
// Moving to a child of the full path, just append crumbs (preserve view cache)
- } else if (_breadcrumbs.size() > 0 && (path.is_child_of(_full_path))) {
+ } else if (!_breadcrumbs.empty() && path.is_child_of(_full_path)) {
string suffix = path.substr(_full_path.length());
while (suffix.length() > 0) {