FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

Add guard-conditions in parse-arg #128

Closed nicolamaritan closed 1 year ago

nicolamaritan commented 1 year ago

Replaced if-else chain in parse_arguments in order to increase readability.

fduncanh commented 1 year ago

in the "for" loop, if .. else if ... else if .. else was used since because arg is a std::string, one cant just use "switch".

why is if ... continue; if ... continue; better? it seems equivalent.

These are not "nested if conditions" where more than one can be true at the same time, its really a "switch" situation, but switch doesnt do strings

nicolamaritan commented 1 year ago

Understood, I thought it could improve readability. Thank you for your time and tip.