I've got one question and one suggestion (not related).
The questions is: What happened with opEquals operator?
In earlier versions this code worked properly:
r |= ase->RegisterObjectMethod("Color", "bool opEquals(const Color &in) const", asMETHODPR(Color, operator==, (const Color &in) const, bool), asCALL_THISCALL); r |= ase->RegisterObjectMethod("Color", "bool opEquals(const Color &in) const", asMETHODPR(Color, operator!=, (const Color &in) const, bool), asCALL_THISCALL);But in 2.25.1 I get r = -1 after execution of the second line.
How can I get working operator!= ?
I use angelscript within marmalade sdk and upon the whole all works fine...excluding one moment:
The marmalade memory manager doesn't like static non-POD (plain of data) objects. Often in that case It detects that there are some memory leaks. Are there really memory leaks or not - I can't judge, but those assertions are annoying.
In particular, within StringFactory function (scriptstdstring.cpp) there is such line:
static string dummy;
Marmalade memory manager considers that here is memory leak.
My workaround is take out this line from StringFactory body:
static string dummy; static const string &StringFactory(asUINT length, const char *s)I can't say why this workaround works but it works.
Now marmalade doesn't see any memory leaks.