ykeara / OpenVR-AdvancedSettings

OpenVR Advanced Settings Dashboard Overlay
GNU General Public License v3.0
36 stars 3 forks source link

Refactor arg parsing and remove/install manifest logic #4

Closed username223 closed 5 years ago

username223 commented 5 years ago

The first part of the main function is mixed argument parsing and mixed logic for installing/removing "vrmanifest" files. This is unnecessarily complex and can be easily simplified.¨

The argument parsing loop has been moved into a function that only looks for a single argument at a time. The performance penalty of this is minimal with the small amount of possible arguments and low amount of expected arguments during normal use.

The install/remove manifest has been refactored into a single if block, since the two blocks were identical except for calling different functions.