From b731f5a51bbccdcc346add34eb6c04ac22941768 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 May 2012 23:12:15 +0000 Subject: Handle exception by reference. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4397 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/BreadCrumbs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/BreadCrumbs.cpp') 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 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::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 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) { -- cgit v1.2.1