Hello!
I'm registering some enums, i.e. TmColors = {clWhite, clBlack etc...}
and trying to use it in initialization lists:
array<int> a={clWhite,clBlack};
and have no result - array elements are empty.
What i do wrong?
Hello!
I'm registering some enums, i.e. TmColors = {clWhite, clBlack etc...}
and trying to use it in initialization lists:
array<int> a={clWhite,clBlack};
and have no result - array elements are empty.
What i do wrong?
You're not doing anything wrong. This looks like a bug. I'll investigate it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Thanks for answer!
I solved it (it works). Really it for dictionary type:
in buffer constructor adding code fragment for enum type in buffer:
if( typeId >= asTYPEID_INT8 && typeId <= asTYPEID_DOUBLE )
{...
}
// ADDED:
else if(engine->GetTypeInfoById(typeId)->GetFlags() & asOBJ_ENUM)
{typeId=asTYPEID_UINT32;
Set(name, (asINT64)*(unsigned int*)ref);
}
I think for other containers it is same case.
I haven't been able to reproduce the problem you mentioned. Can you give a more detailed example of when the problem occurs?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
OK, I'll certainly try it, but I need few days to restore and compile my project