How to solve the problem of a large number of if{}else if{} in the project

How to solve the problem of a large number of if{}else if{} in the project

insert image description here
Solution
(1) Use includes for optimization
insert image description here

(2) Use switch(){case} for optimization

Guess you like

Origin blog.csdn.net/TotoroChinchilla/article/details/131063809