Login  Register

Re: GlueGen Struct Generator Update *API Change* .. etc

Posted by Sven Gothel on Jun 16, 2023; 1:00pm
URL: https://forum.jogamp.org/GlueGen-Struct-Generator-Update-API-Change-etc-tp4042685p4042692.html

Sven Gothel wrote
If my answer would be taken, we would have:

- Copy old -> new non-covered data when allocating new memory
- Adding a 'allowShrink' to the setter

???
Could name it 'boolean subset', i.e. if true, the set*(..) is meant to only set a subset of the 'array',
hence no shrink will occur. Otherwise, if false, the call is meant to set the whole 'array' and may shrink it.

So if 'subset == true', the 'array' should also not grow - this in contrast to a flag named 'allowShrink'.

Which variant tasted better?
I like to avoid generating another function like setSub*(..) of course.