Sign in to follow this  
_Engine_

in and out keywords in parameters

Recommended Posts

Hi!

When we want to change income parametr in C++ function we just declare this - void SomeFunc(type& parametr). This are never was a trouble - never. But in managed languges we must add in or out keyword and that leads to unessesery work and sometimes to stupid mistakes. It is to sad that Angel Script force us to this annoing thing. It is possible to disable this behaveor - we don't want managed style we want c++ style :) Edited by _Engine_

Share this post


Link to post
Share on other sites

engine->SetEngineProperty(asEP_ALLOW_UNSAFE_REFERENCES, true);

 

Of course, with this you'll have to trust your script writers to do the right thing as the script engine can no longer guarantee that all references are valid at all times. By doing this you cannot treat the scripts as a 'sandbox' anymore as it is quite possible to pass a reference to an object that will be invalidated during the execution of a function. 

 

Regards,

Andreas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this