Initialize id number to -1, do not consider it as index

This commit is contained in:
Jean Pierre Cimalando 2020-05-30 17:54:21 +02:00
parent 2c3314d0ad
commit c239629be1
2 changed files with 4 additions and 4 deletions

View file

@ -47,7 +47,7 @@ struct Region {
~Region() = default; ~Region() = default;
/** /**
* @brief Get the number which identifies this region, also its index * @brief Get the number which identifies this region
*/ */
int getIdNumber() const noexcept int getIdNumber() const noexcept
{ {
@ -246,7 +246,7 @@ struct Region {
*/ */
float getGainToEffectBus(unsigned number) const noexcept; float getGainToEffectBus(unsigned number) const noexcept;
const int regionNumber {}; const int regionNumber { -1 };
// Sound source: sample playback // Sound source: sample playback
FileId sampleId {}; // Sample FileId sampleId {}; // Sample

View file

@ -42,7 +42,7 @@ public:
CC CC
}; };
/** /**
* @brief Get the number which identifies this voice, its index * @brief Get the number which identifies this voice
*/ */
int getIdNumber() const noexcept int getIdNumber() const noexcept
{ {
@ -299,7 +299,7 @@ private:
*/ */
void switchState(State s); void switchState(State s);
const int voiceNumber {}; const int voiceNumber { -1 };
StateListener* stateListener = nullptr; StateListener* stateListener = nullptr;
Region* region { nullptr }; Region* region { nullptr };