All Questions
Tagged with control-structures c
2 questions
5
votes
4
answers
485
views
Coding style: Binary logic or multiple if()s?
Something that often comes up in code reviews is the structure of the code, particularly related to the use of control structures, where individuals can be fairly opinionated on what is "right" and ...
40
votes
8
answers
26k
views
Why does Clang/LLVM warn me about using default in a switch statement where all enumerated cases are covered?
Consider the following enum and switch statement:
typedef enum {
MaskValueUno,
MaskValueDos
} testingMask;
void myFunction(testingMask theMask) {
switch (theMask) {
case ...