Remove default argument from function definition

Default arguments should only be specified in function prototypes, not in the function definition. This caused compilation of the library to fail for Arduino AVR Boards 1.6.11 or earlier. It does not cause compilation to fail for Arduino AVR Boards 1.6.12 and newer only because the -fpermissive compiler flag was added, which downgrades this to an error. It has been stated that flag may be removed in the future:
06868f4cd3
So this change is necessary for both backwards and forwards compatibility. Even with current versions it fixes a warning, which is always wise to do.
This commit is contained in:
per1234 2018-03-07 21:32:24 -08:00 committed by GitHub
parent 6726836631
commit 3d476bf1c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ void DDS::stop() {
TCCR2B = 0; TCCR2B = 0;
} }
void DDS::startPhaseAccumulator(bool use_only_timer_2 = false){ void DDS::startPhaseAccumulator(bool use_only_timer_2){
timer2only = use_only_timer_2; timer2only = use_only_timer_2;
if(timer2only){ if(timer2only){