diff options
author | Carl Hetherington <carl@carlh.net> | 2007-10-09 23:04:53 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2007-10-09 23:04:53 +0000 |
commit | 8bcbe9ca4c155c019389b482c71fbc805cc0e9d2 (patch) | |
tree | 6cbc838fa3b0c66f9e087cfae951d5510e98f86f /gtk2_ardour/io_selector.cc | |
parent | 4d66204f4eb96ca802e9b301293ff4bd922717d0 (diff) |
Few cleanups related to signed-ness of minimum/maximum port counts.
git-svn-id: svn://localhost/ardour2/trunk@2532 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/io_selector.cc')
-rw-r--r-- | gtk2_ardour/io_selector.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 0738758931..de5f9efa1b 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -194,14 +194,14 @@ IOSelector::IOSelector (Session& sess, boost::shared_ptr<IO> ior, bool input) const ARDOUR::DataType t = io->default_type(); if (for_input) { - if (io->input_maximum().get(t) < 0 || io->input_maximum().get(t) > (size_t) io->n_inputs().get(t)) { + if (io->input_maximum().get(t) > (uint32_t) io->n_inputs().get(t)) { add_port_button.set_sensitive (true); } else { add_port_button.set_sensitive (false); } } else { - if (io->output_maximum().get(t) < 0 || io->output_maximum().get(t) > (size_t) io->n_outputs().get(t)) { + if (io->output_maximum().get(t) > (uint32_t) io->n_outputs().get(t)) { add_port_button.set_sensitive (true); } else { add_port_button.set_sensitive (false); @@ -212,14 +212,14 @@ IOSelector::IOSelector (Session& sess, boost::shared_ptr<IO> ior, bool input) port_button_box.pack_start (remove_port_button, false, false); if (for_input) { - if (io->input_minimum().get(t) < 0 || io->input_minimum().get(t) < (size_t) io->n_inputs().get(t)) { + if (io->input_minimum().get(t) < (uint32_t) io->n_inputs().get(t)) { remove_port_button.set_sensitive (true); } else { remove_port_button.set_sensitive (false); } } else { - if (io->output_minimum().get(t) < 0 || io->output_minimum().get(t) < (size_t) io->n_outputs().get(t)) { + if (io->output_minimum().get(t) < (uint32_t) io->n_outputs().get(t)) { remove_port_button.set_sensitive (true); } else { remove_port_button.set_sensitive (false); |