Fixed a shadowing issue of with moving to inner scope

This commit is contained in:
Steffen Gaisser 2020-08-13 17:58:42 +02:00
parent e535bc1427
commit 4a2ef6d97f

View File

@ -151,7 +151,6 @@ HybridIterator<ModeListEntry> Subsystem::getTable(Mode_t id) {
} }
ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) { ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
ReturnValue_t result;
switch (message->getCommand()) { switch (message->getCommand()) {
case HealthMessage::HEALTH_INFO: { case HealthMessage::HEALTH_INFO: {
HealthState health = HealthMessage::getHealth(message); HealthState health = HealthMessage::getHealth(message);
@ -166,7 +165,7 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> sequence; FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> sequence;
const uint8_t *pointer; const uint8_t *pointer;
size_t sizeRead; size_t sizeRead;
result = IPCStore->getData( ReturnValue_t result = IPCStore->getData(
ModeSequenceMessage::getStoreAddress(message), &pointer, ModeSequenceMessage::getStoreAddress(message), &pointer,
&sizeRead); &sizeRead);
if (result == RETURN_OK) { if (result == RETURN_OK) {
@ -193,7 +192,7 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> table; FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> table;
const uint8_t *pointer; const uint8_t *pointer;
size_t sizeRead; size_t sizeRead;
result = IPCStore->getData( ReturnValue_t result = IPCStore->getData(
ModeSequenceMessage::getStoreAddress(message), &pointer, ModeSequenceMessage::getStoreAddress(message), &pointer,
&sizeRead); &sizeRead);
if (result == RETURN_OK) { if (result == RETURN_OK) {
@ -210,21 +209,23 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
} }
break; break;
case ModeSequenceMessage::DELETE_SEQUENCE: case ModeSequenceMessage::DELETE_SEQUENCE:{
if (isInTransition) { if (isInTransition) {
replyToCommand(IN_TRANSITION, 0); replyToCommand(IN_TRANSITION, 0);
break; break;
} }
result = deleteSequence(ModeSequenceMessage::getSequenceId(message)); ReturnValue_t result = deleteSequence(ModeSequenceMessage::getSequenceId(message));
replyToCommand(result, 0); replyToCommand(result, 0);
}
break; break;
case ModeSequenceMessage::DELETE_TABLE: case ModeSequenceMessage::DELETE_TABLE:{
if (isInTransition) { if (isInTransition) {
replyToCommand(IN_TRANSITION, 0); replyToCommand(IN_TRANSITION, 0);
break; break;
} }
result = deleteTable(ModeSequenceMessage::getTableId(message)); ReturnValue_t result = deleteTable(ModeSequenceMessage::getTableId(message));
replyToCommand(result, 0); replyToCommand(result, 0);
}
break; break;
case ModeSequenceMessage::LIST_SEQUENCES: { case ModeSequenceMessage::LIST_SEQUENCES: {
SerialFixedArrayListAdapter<Mode_t, MAX_NUMBER_OF_TABLES_OR_SEQUENCES> sequences; SerialFixedArrayListAdapter<Mode_t, MAX_NUMBER_OF_TABLES_OR_SEQUENCES> sequences;