The game I’m working on communicates with some electronics.
I do some calculations on the computer, based on parameters of the electronics.
I’m looking for a good way to be able to easily switch between versions.
The simplest way would probably to use if
s, but I worry about the performance as more places which require this solution are added, and I worry that even if I use some const
s I can change before I compile, the if
s still might not get compiled away (I couldn’t find anything confirming all if(const)
get compiled to without the condition)
Another thought I had was to use a preprocessor directive, and use an editor script to add a preprocessor directive automatically based on which case I’m interested in.
I’m wondering if an even better solution exists out there.