Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Idea for modification AS


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 FDsagizi   Members   -  Reputation: 514

Like
0Likes
Like

Posted 24 January 2013 - 09:09 PM

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...



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3220

Like
0Likes
Like

Posted 25 January 2013 - 10:40 AM

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.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Andreas Jonsson   Moderators   -  Reputation: 3220

Like
2Likes
Like

Posted 13 April 2013 - 04:00 PM

I've implemented this in revision 1617.

 

Regards,

Andreas


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS