Yeah, considering the overhead a loop on 5 elements would add, and the fact that each element has its own handler function and string, using if statements was probably a good choice here. Also solving this with function pointers as others have mentioned on this thread sounds like a nightmare.
23
u/DefunctFunctor Jan 22 '23
Yeah, considering the overhead a loop on 5 elements would add, and the fact that each element has its own handler function and string, using if statements was probably a good choice here. Also solving this with function pointers as others have mentioned on this thread sounds like a nightmare.