- // Always show messages if we are doing general debug
- if (ringbuffer->buffer[i].level == 0 && debug_flags.critical) show_message = 1;
- if (ringbuffer->buffer[i].level == 1 && debug_flags.error) show_message = 1;
- if (ringbuffer->buffer[i].level == 2 && debug_flags.warning) show_message = 1;
- if (ringbuffer->buffer[i].level == 3 && debug_flags.info) show_message = 1;
- if (ringbuffer->buffer[i].level == 4 && debug_flags.calls) show_message = 1;
- if (ringbuffer->buffer[i].level == 5 && debug_flags.data) show_message = 1;
+ case 0: show = debug_flags.critical; break;
+ case 1: show = debug_flags.error; break;
+ case 2: show = debug_flags.warning; break;
+ case 3: show = debug_flags.info; break;
+ case 4: show = debug_flags.calls; break;
+ case 5: show = debug_flags.data; break;