pqc-thunderbird / rnp

Manual clone of the repository https://github.com/rnpgp/rnp
Other
0 stars 0 forks source link

some code to refactor in pgp-key.cpp #31

Closed falko-strenzke closed 1 year ago

falko-strenzke commented 1 year ago

The code shown in the figure below from us in pgp-key.cpp should be refactored. It is not good style to have the function return the value directly in the switch-case statements in general and return it for the EC-schemes at the end of the function outside the switch-case statment. Rather, the result for the EC-schemes should be returned (after fallthrough) in the last of the EC labels.

Screenshot from 2023-06-12 11-20-33