Voice accessor without const qualifier

This commit is contained in:
Jean Pierre Cimalando 2020-07-28 14:55:15 +02:00
parent 1a10f7b166
commit 93bca10a45

View file

@ -210,6 +210,17 @@ public:
* @return const Voice*
*/
const Voice* getVoiceById(NumericId<Voice> id) const noexcept;
/**
* @brief Find the voice which is associated with the given identifier.
*
* @param id
* @return Voice*
*/
Voice* getVoiceById(NumericId<Voice> id) noexcept
{
return const_cast<Voice*>(
const_cast<const Synth*>(this)->getVoiceById(id));
}
/**
* @brief Get a raw view into a specific region. This is mostly used
* for testing.