Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e15c562

Browse files
authoredAug 12, 2024··
Employ auto for variables where the type is obvious from the right-hand side.
1 parent ee2ead8 commit e15c562

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎cores/arduino/Interrupts.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void IrqCallback(external_irq_callback_args_t * p_args) {
9595
void * param = (void *)p_args->p_context;
9696
uint32_t ch = p_args->channel;
9797

98-
CIrq *irq_context = nullptr;
98+
auto *irq_context = nullptr;
9999

100100
if(ch < MAX_IRQ_CHANNEL) {
101101
irq_context = IrqChannel.get(ch,false);
@@ -118,7 +118,7 @@ static void IrqCallback(external_irq_callback_args_t * p_args) {
118118
void detachInterrupt(pin_size_t pinNumber) {
119119
/* -------------------------------------------------------------------------- */
120120

121-
CIrq *irq_context = nullptr;
121+
auto *irq_context = nullptr;
122122
const int ch = pin2IrqChannel(pinNumber);
123123

124124
if(ch >= 0 && ch < MAX_IRQ_CHANNEL) {
@@ -137,7 +137,7 @@ void detachInterrupt(pin_size_t pinNumber) {
137137
void attachInterruptParam(pin_size_t pinNumber, voidFuncPtrParam func, PinStatus mode, void* param) {
138138
/* -------------------------------------------------------------------------- */
139139

140-
CIrq *irq_context = nullptr;
140+
auto *irq_context = nullptr;
141141
const int ch = pin2IrqChannel(pinNumber);
142142

143143
if(ch >= 0 && ch < MAX_IRQ_CHANNEL) {
@@ -194,7 +194,7 @@ void attachInterrupt(pin_size_t pinNumber, voidFuncPtr func, PinStatus mode) {
194194
}
195195

196196
int attachIrq2Link(uint32_t pinNumber, PinStatus mode) {
197-
CIrq *irq_context = nullptr;
197+
auto *irq_context = nullptr;
198198
const int ch = pin2IrqChannel(pinNumber);
199199

200200
if(ch >= 0 && ch < MAX_IRQ_CHANNEL) {
@@ -248,7 +248,7 @@ int attachIrq2Link(uint32_t pinNumber, PinStatus mode) {
248248
int detachIrq2Link(pin_size_t pinNumber) {
249249
/* -------------------------------------------------------------------------- */
250250

251-
CIrq *irq_context = nullptr;
251+
auto *irq_context = nullptr;
252252
const int ch = pin2IrqChannel(pinNumber);
253253

254254
if(ch >= 0 && ch < MAX_IRQ_CHANNEL) {

0 commit comments

Comments
 (0)
Please sign in to comment.