Skip to content
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 for unsafe_any_cast #198

Merged
merged 2 commits into from
Mar 31, 2017
Merged

Conversation

karthikreddy09
Copy link
Member

Signed-off-by: Mathworks Inc Roy.Lurie@mathworks.com

Signed-off-by: Mathworks Inc <Roy.Lurie@mathworks.com>
@@ -29,6 +29,14 @@

using namespace cppmicroservices;

template <typename T>
void TestUnsafeAnyCast(Any& anyObj, T val)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe assign the unsafe cast to a local ptr?

T* ptr = unsafe_any_cast<T>(&anyObj);
US_TEST_CONDITION(ptr, "unsafe_any_cast");

and similarly for other 2 US_TEST_CONDITIONs

Signed-off-by: Mathworks Inc <Roy.Lurie@mathworks.com>
@karthikreddy09 karthikreddy09 self-assigned this Mar 31, 2017
@karthikreddy09 karthikreddy09 merged commit ae83b81 into development Mar 31, 2017
@karthikreddy09 karthikreddy09 deleted the 197-fix-unsafe-any-cast branch March 31, 2017 17:21
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.

None yet

4 participants