Advertisement

const parameter

Started by December 31, 2014 06:18 PM
0 comments, last by WitchLord 9 years, 10 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);

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