jump to:all–mastodon–bluesky–lemmy–lobsters–dev–stack–wiki–rss–hn
wwebbit
view: | | |

Knowledge / Stack Overflow · hot matching “switch-statement”

1 shown · updated 3s ago · read only
  1. Replace consequential if statements with for loop & switch in C (stackoverflow.com)stack

    21 points by p_a321 in stackoverflow.com · 24h ago · stack comments

    I am trying to refactor code in the most efficient ( and readable ) way. The code will run on an embedded target (ARM Cortex-M4), so code size is important. I have a variable where each bit represents a true/false value, lets say : uint64_t my_boolean_values = 0b1001101110101 Fo…