WARDuino icon indicating copy to clipboard operation
WARDuino copied to clipboard

PR #250 introduces a lot of duplicate code for defining reversible primitives

Open tolauwae opened this issue 6 months ago • 0 comments

The #250 PR introduces a lot of duplicate code for defining reversible primitives.

It is not trivial to refactor but should be done either way.

Relevant discussion:

This is what I have been wanting to do, but because the primitives array is a global array with a fixed size defined using a #define in the cpp file this can't be very easily done. You can't really use the #define for the size from another file using extern. You also can't make it an integer because not all c++ compilers support using variables as array size. The solution would probably be to just use an std::vector.

Originally posted by @MaartenS11 in https://github.com/TOPLLab/WARDuino/pull/250#discussion_r1738646358

tolauwae avatar Aug 31 '24 08:08 tolauwae