Trade: drop assertions for 64-bit object/parent values from SceneData.
This has to be solved on a more systematic level, perhaps even by
switching all types to be 64-bit. In the following commit all *AsArray()
and *Int() functions will output the object IDs as well, meaning this
would need to be handled in each and every API, which is a huge
maintenance burden.
As it's very unlikely that there actually will *ever* be >4G objects,
one possible option would be to introduce some "object ID hash" field
that would provide (contiguous?) remapping of the object ID to 32-bit
values, and the Into() and AsArray() accessors would return this
remapping instead of the original. But then again it'd cause issues with
for example animation references that would still reference the original
64-bit value.
CORRADE_ASSERT(_objectCount<=0xffffffffull,"Trade::SceneData::objectsInto(): indices for up to"<<_objectCount<<"objects can't fit into a 32-bit type, access them directly via objects() instead",);
CORRADE_ASSERT(field._size<=0xffffffffull,"Trade::SceneData::parentsInto(): parent indices for up to"<<field._size<<"objects can't fit into a 32-bit type, access them directly via field() instead",);
/* AsArray calls into IntoArray, which then has the assert, so this tests
both*/
std::ostringstreamout;
ErrorredirectError{&out};
scene.parentsAsArray();
CORRADE_COMPARE(out.str(),
"Trade::SceneData::parentsInto(): parent indices for up to 4294967296 objects can't fit into a 32-bit type, access them directly via field() instead\n");