-
Notifications
You must be signed in to change notification settings - Fork 742
Fix any istype #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix any istype #708
Conversation
Signed-off-by: Gaël Écorchard <[email protected]>
Now compares the original type, not the casted one. Signed-off-by: Gaël Écorchard <[email protected]>
Motivation? |
Signed-off-by: Gaël Écorchard <[email protected]>
I need to convert blackboard entries to my Lua environment. I cannot use |
return type() == typeid(int64_t) || | ||
type() == typeid(uint64_t) || | ||
type() == typeid(double); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this. Shouldn't you include all the possible arithmetic types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use _any.type()
?
Now the isNumber
function is not called in behaviortree_cpp (isCastedAsNumber
is used instead).
return type() == typeid(int64_t) || | ||
type() == typeid(uint64_t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above. You should probably add all the integrals
this is still public API, I want to be sure that the behavior of public method is not changed |
I did it in a generic way using |
Also extend `isNumber()` to all number types. Signed-off-by: Gaël Écorchard <[email protected]>
I don't want to introduce the method isCastedType, therefore I cherry picked the other changes. Thanks! |
No description provided.