Jump to content
  • Advertisement
Sign in to follow this  
FDsagizi

Idea for modification AS

This topic is 1896 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

Hismile.png ( sorry for my English )

 

 

Idea: what you think about - add flag to engine for disable operator copy for script classes and classes registred as AS_REF ?
 
I know, version 3 as use only referens - but, we need is this time.
 
Code

 

 

 

 

class MyClass
{}

void F()
{
    // 1 - Ok!
    MyClass @a = MyClass();
    MyClass @b = a;

    // 2 - Hard
    MyClass c;
    MyClass d = c;

    // 3 - Very hard
    MyClass @e = MyClass();
    MyClass f = e; // do make me cry sometimes
}
 

 

 

if it possible, make possible disable 2 and 3 variant...

Share this post


Link to post
Share on other sites
Advertisement

I actually had this idea already :) and I think it will definitely make it easier to avoid unwanted value assignments.

 

I'll see if I can have this implemented for 2.26.1.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!