Notice that the member that we're setting on the left side of each assignment has an orderly correspondence to the string literal on the right side. What we want, to make code much simpler, is something like this:
MapToMember(pSettings, <member match expr>, OmnivoreGetBooleanProperty, <renamed or transformed match expr>)
Perhaps a better name for this function would be "Dispatch". There are so many examples of dispatching (mapping from constants, user input, enums, etc) to a function call. Doing this more cleanly and with less repetition would be a big win.
Consider the following block of code:
Notice that the member that we're setting on the left side of each assignment has an orderly correspondence to the string literal on the right side. What we want, to make code much simpler, is something like this:
Perhaps a better name for this function would be "Dispatch". There are so many examples of dispatching (mapping from constants, user input, enums, etc) to a function call. Doing this more cleanly and with less repetition would be a big win.