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?
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!
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?
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?