good form to initialize all member variables in the declaration
squinkylabs opened this issue · comments
It's essential that all struct/class members be initalized. It looks like your constructor all do that fine. To me, it’s always a good idea to initialize very member variable directly.
So instead of:
PadBinder* binder;
I would say
PadBinder* binder = nullptr;
This will prevent mysterious issues in the future, where things aren't initializied at all and different random things will occur. This is of course not necessary at all. Most VCV modules probably don't do this. It is, for example, required where I work.
Actually noticed one time when I was fighting a bug that some fields seemed to have random values and this is probably why. Good one!