milesburton / Arduino-Temperature-Control-Library

Arduino Temperature Library
https://www.milesburton.com/w/index.php/Dallas_Temperature_Control_Library
973 stars 487 forks source link

Remove shadowing by making use of more explicit names #248

Closed cjoach closed 1 year ago

cjoach commented 1 year ago

The name bitResolution is used in different contexts in the library and sometimes the local name shadows the class attribute. This PR modifies the names to be more explicit and remove the -Wshadow warnings.

RobTillaart commented 1 year ago

@cjoach Which platform/ compiler gives these warning?

milesburton commented 1 year ago

Hmm interesting PR @cjoach. Looks like a decent change. Any issues @RobTillaart ?

RobTillaart commented 1 year ago

@milesburton I checked the code and there are still a handful occurrences of bitResolution. However these are all parameters of functions and could be either device- or globalBitResolution. So they are all renamed consistently ==> no problemo with this PR. LGTM.

milesburton commented 1 year ago

As always. thanks @RobTillaart . Again thanks for your contribution @cjoach