🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

const parameter

Started by
0 comments, last by WitchLord 9 years, 6 months ago

I have a question regarding const in Angelscript with const parameters

I notice that


MYASSERT(e->RegisterObjectMethod("Mouse", "void pos(const Vector2 &in)", asMETHODPR(Mouse, pos, (C Vector2 &), void), asCALL_THISCALL) >= 0);

I still have to specify &in else it will complain about &inout, is there anyway for auto handling that if const for the parameter is specified a single & would be done as &in for you? as I doubt anyone want to pass &inout for a const parameter anyway.


MYASSERT(e->RegisterObjectMethod("Mouse", "void pos(const Vector2 &)", asMETHODPR(Mouse, pos, (C Vector2 &), void), asCALL_THISCALL) >= 0);
Advertisement

I'll consider it. Thanks for the suggestion.

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

This topic is closed to new replies.

Advertisement