ivanseidel / LinkedList

🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects
MIT License
347 stars 120 forks source link

Type mismatch error #43

Open miguelh72 opened 3 years ago

miguelh72 commented 3 years ago

Arduino\libraries\LinkedList/LinkedList.h:160:9: error: cannot convert 'bool' to 'ListNode*' in return

return false;

But return type must be ListNode not boolean.

ryan-lastufka commented 3 years ago

Made a bad temporary workaround by changing line 160 to return current; on my local copy of the library. Hoping for a proper fix soon.

Funny enough this was not an issue on the Arduino Due, but it prevents compiling on Arduino Mega.

PatKeel commented 3 years ago

Also have this issue with boards uno and micro since Arduino V1.8.10. With V1.8.9 everything was ok. ryan-lastufka's workaround works for me, thank you. As i have found in other C++ articles you can return NULL for ListNode*

gilad-solter commented 3 years ago

Having the same issue with Arduino Uno.

@ryan-lastufka workaround works for me too. Thanks!