Merge pull request #337 from jpcima/get-voice-non-const
Voice accessor without const qualifier
This commit is contained in:
commit
3f999d5f37
1 changed files with 11 additions and 0 deletions
|
|
@ -210,6 +210,17 @@ public:
|
||||||
* @return const Voice*
|
* @return const Voice*
|
||||||
*/
|
*/
|
||||||
const Voice* getVoiceById(NumericId<Voice> id) const noexcept;
|
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
|
* @brief Get a raw view into a specific region. This is mostly used
|
||||||
* for testing.
|
* for testing.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue