C++ discards qualifiers

I have this error:

BSPArduino.cpp:316: error: passing ‘const BSPArduino’ as ‘this’ argument of ‘virtual void BSPArduino::enableWdt(const WATCHDOG_TIMER_DELAY&, const ___bool&)’ discards qualifiers

This method is define like that:

void BSPArduino::enableWdt(const WATCHDOG_TIMER_DELAY &delay, const ___bool &enable)

I want to call it like that:

enableWdt(this->watchdogTimer, ___false);

With:

WATCHDOG_TIMER_DELAY watchdogTimer;

I don’t understand why this build error…

Thank you so much for your help

Anthony

Leave a Comment