diff options
author | David Robillard <d@drobilla.net> | 2012-05-13 23:12:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-13 23:12:15 +0000 |
commit | b731f5a51bbccdcc346add34eb6c04ac22941768 (patch) | |
tree | 2f22036acaa64cac24ad12befb09117b53ac0a3b /src/gui | |
parent | a77f8abd48020c23fa894cc0e0e24927696adf1e (diff) | |
download | ingen-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')
-rw-r--r-- | src/gui/App.cpp | 2 | ||||
-rw-r--r-- | src/gui/BreadCrumbs.cpp | 5 | ||||
-rw-r--r-- | src/gui/PatchPortModule.cpp | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index f9f47ddf..a815c6e7 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -376,7 +376,7 @@ App::icon_from_path(const string& path, int size) buf->add_destroy_notify_callback( new IconDestroyNotification(*this, make_pair(path, size)), &App::icon_destroyed); - } catch (Glib::Error e) { + } catch (const Glib::Error& e) { warn << "Error loading icon: " << e.what() << endl; } return buf; 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) { diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index e716a12d..3c04d29e 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -119,10 +119,11 @@ PatchPortModule::show_human_names(bool b) { const URIs& uris = app().uris(); const Atom& name = _model->get_property(uris.lv2_name); - if (b && name.type() == uris.forge.String) + if (b && name.type() == uris.forge.String) { set_name(name.get_string()); - else + } else { set_name(_model->symbol().c_str()); + } } void |