Skip to content

Conversation

@luke-j
Copy link
Contributor

@luke-j luke-j commented Aug 5, 2015

It's valid to increment a field by a float, this allows both ints and floats to be used in increments and decrements, while still keeping the default (int)1.

It's valid to increment a field by a float, this allows both ints and floats to be used in increments and decrements.
@avbdr
Copy link
Collaborator

avbdr commented Aug 5, 2015

patch looks valid except that I would like to add is_numeric() validation as we are removing int cast.Can you fix and send?
thanks

@luke-j
Copy link
Contributor Author

luke-j commented Aug 5, 2015

Sure thing! Changed to an error when an invalid argument is supplied, checked with is_number().

avbdr added a commit that referenced this pull request Aug 5, 2015
Changed inc() and dec() methods to support float
@avbdr avbdr merged commit 24a8a99 into ThingEngineer:master Aug 5, 2015
@avbdr
Copy link
Collaborator

avbdr commented Aug 5, 2015

thanks. commited.

@luke-j
Copy link
Contributor Author

luke-j commented Aug 5, 2015

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants