diff options
author | David Robillard <d@drobilla.net> | 2010-02-23 22:45:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-23 22:45:07 +0000 |
commit | 0efd1c6f0b8017d1d35757e7429d64f245966ff1 (patch) | |
tree | 24f4c5229f9be6f1857a3718b0d487a613242508 /libs/ardour/ardour/chan_count.h | |
parent | 650c6d5824222a8879df5c5ba9645c264ed3b84f (diff) |
Factor out massive code duplication in route creation stuff.
Fix auto-connect logic for multiply-typed routes.
git-svn-id: svn://localhost/ardour2/branches/3.0@6711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/chan_count.h')
-rw-r--r-- | libs/ardour/ardour/chan_count.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index 3dc6423607..b24ff2336c 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -114,6 +114,13 @@ public: return ret; } + ChanCount& operator+=(const ChanCount& other) { + for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { + _counts[*t] += other._counts[*t]; + } + return *this; + } + static ChanCount min(const ChanCount& a, const ChanCount& b) { ChanCount ret; for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { |