[Misc] Apply SonarCloud rule cpp:S912

SonarCloud rule fix

Other comments