WARDuino
WARDuino copied to clipboard
PR #250 introduces a lot of duplicate code for defining reversible primitives
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 anstd::vector
.Originally posted by @MaartenS11 in https://github.com/TOPLLab/WARDuino/pull/250#discussion_r1738646358