Closed ffontaine closed 5 years ago
Nice catch @ffontaine!
@crayzeewulf , this looks great to me, hardware unit tests all pass with this PR. Good to go!
-Mark
For the convenience of anyone else who might be curious, https://en.cppreference.com/w/cpp/types/size_t http://www.cplusplus.com/reference/cstring/size_t/ Thanks again for the PR @ffontaine .
Fabrice:
Thanks for suggestion. Libserial avoids use of C-style casts in the code. How about using static cast instead. In other words:
static_cast<size_t>(1)
or just:
size_t {1}
Otherwise, it looks like a valid update.
Here is a useful/relevant article from Scott Meyers on this subject for reference.
Nice catch @ffontaine!
@crayzeewulf , this looks great to me, hardware unit tests all pass with this PR. Good to go!
-Mark
Thanks for checking this, Mark. Other than my nitpick about C-style casts, it ought to be good to make this change.
Indeed, size_t {1} is also ok, I will update the PR.
Indeed, size_t {1} is also ok, I will update the PR.
Thanks!!!
size_t can be defined as an unsigned int instead of long unsigned int so replace 1UL to (size_t)1 when calling max function
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com