C++11 does not like constexpr

This commit is contained in:
Paul Ferrand 2020-05-07 23:16:07 +02:00
parent dbb75398cc
commit ec13c70b82

View file

@ -156,19 +156,19 @@ public:
*
* @return int
*/
constexpr int getTriggerNumber() const noexcept { return triggerNumber; }
int getTriggerNumber() const noexcept { return triggerNumber; }
/**
* @brief Get the value that triggered the voice (note velocity or cc value)
*
* @return float
*/
constexpr float getTriggerValue() const noexcept { return triggerValue; }
float getTriggerValue() const noexcept { return triggerValue; }
/**
* @brief Get the type of trigger
*
* @return TriggerType
*/
constexpr TriggerType getTriggerType() const noexcept { return triggerType; }
TriggerType getTriggerType() const noexcept { return triggerType; }
/**
* @brief Reset the voice to its initial values
@ -220,7 +220,7 @@ public:
*
* @return
*/
constexpr int getAge() const noexcept { return age; }
int getAge() const noexcept { return age; }
Duration getLastDataDuration() const noexcept { return dataDuration; }
Duration getLastAmplitudeDuration() const noexcept { return amplitudeDuration; }
@ -314,7 +314,7 @@ private:
LEAK_DETECTOR(Voice);
};
constexpr bool sisterVoices(const Voice* lhs, const Voice* rhs)
inline bool sisterVoices(const Voice* lhs, const Voice* rhs)
{
return lhs->getAge() == rhs->getAge()
&& lhs->getTriggerNumber() == rhs->getTriggerNumber()