Mercurial > hg > piper-cpp
comparison vamp-support/DefaultPluginOutputIdMapper.h @ 280:4b581a498981
Use override throughout
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Mon, 26 Nov 2018 13:39:01 +0000 |
parents | 427c4c725085 |
children |
comparison
equal
deleted
inserted
replaced
279:b7eec400cd94 | 280:4b581a498981 |
---|---|
47 for (const auto &d: outputs) { | 47 for (const auto &d: outputs) { |
48 m_ids.push_back(d.identifier); | 48 m_ids.push_back(d.identifier); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 virtual int idToIndex(std::string outputId) const noexcept { | 52 int idToIndex(std::string outputId) const noexcept override { |
53 int n = int(m_ids.size()); | 53 int n = int(m_ids.size()); |
54 for (int i = 0; i < n; ++i) { | 54 for (int i = 0; i < n; ++i) { |
55 if (outputId == m_ids[i]) { | 55 if (outputId == m_ids[i]) { |
56 return i; | 56 return i; |
57 } | 57 } |
58 } | 58 } |
59 return -1; | 59 return -1; |
60 } | 60 } |
61 | 61 |
62 virtual std::string indexToId(int index) const noexcept { | 62 std::string indexToId(int index) const noexcept override { |
63 if (index < 0 || size_t(index) >= m_ids.size()) return ""; | 63 if (index < 0 || size_t(index) >= m_ids.size()) return ""; |
64 return m_ids[index]; | 64 return m_ids[index]; |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |