Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

[WIP] Allow setting boolean parameter with "true" and "false" #332

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

krocard
Copy link
Contributor

@krocard krocard commented Jan 11, 2016

Boolean parameters can now be set with values such as "true" and "false".


 

@krocard krocard force-pushed the use-convertto-for-boolean-parameter branch 3 times, most recently from 9d71f55 to e17178c Compare January 12, 2016 01:28
@krocard krocard changed the title Allow setting boolean parameter with "true" and "false" [WIP] Allow setting boolean parameter with "true" and "false" Jan 12, 2016
@krocard krocard force-pushed the use-convertto-for-boolean-parameter branch 2 times, most recently from c66e4b8 to 95daa50 Compare January 12, 2016 10:36
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
convertTo<bool> now allow 0x0 and 0x1 as input.
It was inconsistant with the other types.

Do that by converting the string to uint8_t and then
testing for 0 or 1.

Also do a case insensitive comparison for "true" and "false".

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Instead of hard coding specific values a boolean
can take, use covertTo.

This means a lot of values are now taken as boolean
(like "true" and "false") and not only {,0x}{0,1}.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
It was not tested.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
The tests were using the setAsDouble version instead of the more generic
setAs<Double>.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
@krocard krocard force-pushed the use-convertto-for-boolean-parameter branch from 95daa50 to bd767ad Compare January 12, 2016 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant