SamNainocard
Member
|
April's new Reference<> and Cache's code editor problem
After the update, it seems all of my Reference<> are throwing the error of the == and != function only accept const, and not accepting extended class.
Like...
Code:
Reference<Game.Obj> ref;
Game.Obj *obj;
if(ref!=obj) ref=obj; //Error: No conversion of Game.obj *const* to Game.obj *const
Chr *chr;
if(ref==chr); // extended class no longer work too
Is there a better solution than to cast to const?
Code:
if(ref!=(C Game.Obj*)obj) ref=obj;
Also, code editor doesn't seem to suggest any function with new Cache. Like when typing ObjectPtr().require()
Btw, love the animation editor, along with root and mirror update.
|
|
04-01-2018 03:32 PM |
|
Esenthel
Administrator
|
RE: April's new Reference<> and Cache's code editor problem
Thank you very much, I've uploaded the fix.
Sorry that this "ObjectPtr().require()" doesn't display auto-complete at the moment, I will try to improve in the future, but can't do it now.
Normally I do:
ObjectPtr obj=UID(..);
alternatively:
ObjectPtr obj;
obj.require(..)
obj.get(..)
obj.find(..)
|
|
04-02-2018 12:26 AM |
|
SamNainocard
Member
|
RE: April's new Reference<> and Cache's code editor problem
Awesome, all work nicely.
Anyways, new ObjectPtr() is a lot easier to use and much cleaner code.
|
|
04-02-2018 11:36 AM |
|