Refactor ref syntax

This commit is contained in:
ford-jones 2025-09-15 15:21:40 +12:00
parent 5fca3a30ec
commit f0b7aab030

View File

@ -346,8 +346,8 @@ void Channels::setChannel(const meshtastic_Channel &c)
void Channels::setMute(ChannelIndex chIndex)
{
if (chIndex < channelFile.channels_count) {
meshtastic_Channel *ch = &getByIndex(chIndex);
ch->settings.mute = !ch->settings.mute;
meshtastic_Channel &ch = getByIndex(chIndex);
ch.settings.mute = !ch.settings.mute;
} else {
LOG_ERROR("Failed to mute. Invalid channel index %d > %d", chIndex, channelFile.channels_count);
};