this is the correct implementation

This commit is contained in:
Robin Müller 2021-07-14 10:35:37 +02:00
parent 5f0a3f3baa
commit df1d5e5005
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -20,7 +20,7 @@ ReturnValue_t QueueMapManager::addMessageQueue(QueueHandle_t queue, MessageQueue
uint32_t currentId = queueCounter++; uint32_t currentId = queueCounter++;
if(currentId == MessageQueueIF::NO_QUEUE) { if(currentId == MessageQueueIF::NO_QUEUE) {
// Skip the NO_QUEUE value // Skip the NO_QUEUE value
currentId++; currentId = queueCounter++;
} }
auto returnPair = queueMap.emplace(currentId, queue); auto returnPair = queueMap.emplace(currentId, queue);
if(not returnPair.second) { if(not returnPair.second) {