Question about the colorutils.h code.  Why sometimes a variable is declared in a function

Question about the colorutils.h code.

Why sometimes a variable is declared in a function as CHSV and at other moments as const struct CHSV&?

Like in:
void fill_gradient( T* targetArray,
uint16_t startpos, CHSV startcolor,
uint16_t endpos, CHSV endcolor,
TGradientDirectionCode directionCode = SHORTEST_HUES )

void fill_gradient( T* targetArray, uint16_t numLeds, const CHSV& c1, const CHSV& c2,
TGradientDirectionCode directionCode = SHORTEST_HUES )

Most of them (all?) should be const references. The others are probably just oversights. I’ll review them. Thanks for spotting it.

Passing a const reference is generally more efficient. Passing an object is likely to force the object to be copied (pass by value).

Clear. Thanks for the explanation. I’ve found also another bug (I think) I posted that one as an issue in Github:

Thanks. Yeah. I think I had run into that one too; I appreciate the ticket!