diff options
author | David Robillard <d@drobilla.net> | 2019-12-08 18:15:35 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-08 20:59:06 +0100 |
commit | 88dff1aabd3c81d1d81ac256e0061b98e0d24cec (patch) | |
tree | a36763244801dbb2016c84cad81587c6a650a5fc /src | |
parent | c35cbf038d0992887b8d4bcf5d4ff83c323ec60c (diff) | |
download | ingen-88dff1aabd3c81d1d81ac256e0061b98e0d24cec.tar.gz ingen-88dff1aabd3c81d1d81ac256e0061b98e0d24cec.tar.bz2 ingen-88dff1aabd3c81d1d81ac256e0061b98e0d24cec.zip |
Cleanup: Use empty() instead of size() where appropriate
Diffstat (limited to 'src')
-rw-r--r-- | src/ClashAvoider.cpp | 2 | ||||
-rw-r--r-- | src/gui/ConnectWindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/GraphTreeWindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/LoadGraphWindow.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp index 4dc8c64d..1c1e4db1 100644 --- a/src/ClashAvoider.cpp +++ b/src/ClashAvoider.cpp @@ -113,7 +113,7 @@ ClashAvoider::map_path(const Raul::Path& in) ss << base_path << "_" << offset; if (!exists(Raul::Path(ss.str()))) { std::string name = base_path.symbol(); - if (name == "") { + if (name.empty()) { name = "_"; } Raul::Symbol sym(name); diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 232b5e20..209475e0 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -526,7 +526,7 @@ ConnectWindow::gtk_callback() _app->interface()->get(URI(main_uri().string() + "/")); next_stage(); } else if (_connect_stage == 4) { - if (_app->store()->size() > 0) { + if (!_app->store()->empty()) { SPtr<const GraphModel> root = dynamic_ptr_cast<const GraphModel>( _app->store()->object(Raul::Path("/"))); if (root) { diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp index 5046eac9..68f6e392 100644 --- a/src/gui/GraphTreeWindow.cpp +++ b/src/gui/GraphTreeWindow.cpp @@ -139,7 +139,7 @@ GraphTreeWindow::find_graph(Gtk::TreeModel::Children root, SPtr<GraphModel> pm = (*c)[_graph_tree_columns.graph_model_col]; if (graph == pm) { return c; - } else if ((*c)->children().size() > 0) { + } else if (!(*c)->children().empty()) { Gtk::TreeModel::iterator ret = find_graph(c->children(), graph); if (ret != c->children().end()) { return ret; diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index e3588ddf..62c68b04 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -163,7 +163,7 @@ LoadGraphWindow::ok_clicked() _app->forge().make(_poly_spinbutton->get_value_as_int())); } - if (get_uri() == "") { + if (get_uri().empty()) { return; } @@ -189,7 +189,7 @@ LoadGraphWindow::ok_clicked() y = _app->forge().make(y.get<float>() + 20.0f); Raul::Symbol symbol(symbol_from_filename(u)); - if (uri_list.size() == 1 && _symbol_entry->get_text() != "") { + if (uri_list.size() == 1 && !_symbol_entry->get_text().empty()) { symbol = Raul::Symbol::symbolify(_symbol_entry->get_text()); } |