Don’t use return in a void function. That’s bad code design.
Just negate the if statement:
if (this->target_percentage != percentage)
{
// do your stuff
}
Don’t use return in a void function. That’s bad code design.
Just negate the if statement:
if (this->target_percentage != percentage)
{
// do your stuff
}
Didn’t know that, thanks.
May you want to read this:
good idea @iQD 