Jump to content
  • Advertisement
Sign in to follow this  
behc

Property accessors with POD types

This topic is 2482 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

I think I found potential bug with property accessors when using POD types without opAssign registered.
Explicit call like: 'val = obj.get_Value();' works, but 'val = obj.Value;' results in returning garbage with no indications that get_Value() was ever called. On top of that, compiler doesn't give any errors in ''val = obj.Value;' even if only set_Value(type) was registered.

All of this is fixed when registering opAssign for that POD type. (The POD type was registered with flags: asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CK | asOBJ_APP_CLASS_ALLFLOATS, I'm using rev: 1006)

Share this post


Link to post
Share on other sites
Advertisement
I'll investigate this. In the meantime, could you upgrade to revision 1024? Its possible the latest bug fixes has fixed this scenario too.

Share this post


Link to post
Share on other sites
It looks like recent changes have fixed my problems too. Thanks for quick reply.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!