Simplify the list of available backends and names
Define a constant string for the backend name, instead of a function which returns it. The name can be a simple C string because it is only used internally. Having done this, the name can be stored in the g_mixerFactories list instead of the function, making the lookup in backendNameFor() much easier and eliminating having to count through the list in numBackends(). The backend virtual function getDriverName() can also just return this static string, so avoiding repetitive repetition of the name.
parent
5327366a
Please register or sign in to comment