You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not creating a pull request because it's such a small thing to do, but I thought it was worth suggesting. I first saw this used while doing some TI development.
Currently you have
`#define UNKNOWN 0
#define NEC 1
...
#define LAST_PROTOCOL 12 // Be sure to update this`
This will automatically update the value for LAST_PROTOCOL as well as provide a bit more structure. Since you're already using OOP paradigms with C++, then I'd also suggest enum classes. However, that would require rewriting some code. What I suggested shouldn't break anything and also make it less error prone.
The text was updated successfully, but these errors were encountered:
By keeping the enum anonymous, it shouldn't interfere with any of your existing code. I'd also request changing the names of the protocols or namespace because they've interfered with other projects.
I'm not creating a pull request because it's such a small thing to do, but I thought it was worth suggesting. I first saw this used while doing some TI development.
Currently you have
What you can do instead is
This will automatically update the value for LAST_PROTOCOL as well as provide a bit more structure. Since you're already using OOP paradigms with C++, then I'd also suggest enum classes. However, that would require rewriting some code. What I suggested shouldn't break anything and also make it less error prone.
The text was updated successfully, but these errors were encountered: