Anonymous | Login | Signup for a new account | 2025-06-18 04:30 UTC | ![]() |
My View | View Issues | Change Log | Roadmap | Doomseeker Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0003815 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 06:00 | 2020-06-08 13:42 | ||||||||
Reporter | WubTheCaptain | ||||||||||||
Assigned To | |||||||||||||
Priority | none | Severity | trivial | Reproducibility | have not tried | ||||||||
Status | acknowledged | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 1.3.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003815: Found else statements after interrupted control flow | ||||||||||||
Description | This is just a code style thing, so sort of trivial or a matter of undetermined preference.Quote from clang-tidy Refers to LLVM Coding Standards. I personally agree with the clang-tidy suggestion here. | ||||||||||||
Steps To Reproduce | Some hand-picked examples (not exhaustive):-- src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- return gameParametersList(); src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- } src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp: else -- src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- return NoneCanVote; src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- } src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp: else if (rbSpectatorsCantVote->isChecked()) -- src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- return SpectatorsCantVote; src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp- } src/plugins/zandronum/createserverdialogpages/votingsetupwidget.cpp: else -- src/plugins/zandronum/zandronumbinaries.cpp- return ExeFile::pathToExe(message); src/plugins/zandronum/zandronumbinaries.cpp- } src/plugins/zandronum/zandronumbinaries.cpp: else -- grep -B 2 -r "else" src/ | less can be somewhat helpful. | ||||||||||||
Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/readability-delete-null-pointer.html [^]' NB: That page's advice also contradict's clang-tidy's readability-braces-around-statements check (which is also a check I don't agree with). 🙂 | ||||||||||||
Attached Files | |||||||||||||
![]() |
|
Pol M (developer) 2020-06-07 20:45 |
I personally see no special need to do this change, one could argue that it provides intent to add the else's, so I would not bother with this one (plus it will probably change the entirety of the files XD) |
Blzut3 (administrator) 2020-06-08 01:21 |
I'm indifferent about this one. I personally do both styles based on what appears to be more readable for the particular block of code. Generally go with the recommendation here, but sometimes that needless else just looks right. |
Zalewa (developer) 2020-06-08 13:42 |
Indifferent. |
Only registered users can voice their support. Click here to register, or here to log in. | |
Supporters: | No one explicitly supports this issue yet. |
Opponents: | No one explicitly opposes this issue yet. |
![]() |
|||
Date Modified | Username | Field | Change |
2020-06-07 06:00 | WubTheCaptain | New Issue | |
2020-06-07 20:45 | Pol M | Note Added: 0021389 | |
2020-06-07 20:45 | Pol M | Status | new => feedback |
2020-06-08 01:21 | Blzut3 | Note Added: 0021406 | |
2020-06-08 02:17 | WubTheCaptain | Status | feedback => acknowledged |
2020-06-08 13:42 | Zalewa | Note Added: 0021435 |
Copyright © 2000 - 2025 MantisBT Team |