Anonymous | Login | Signup for a new account | 2024-03-28 23:21 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 | ||||||||
0003810 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 04:20 | 2020-06-07 20:18 | ||||||||
Reporter | WubTheCaptain | ||||||||||||
Assigned To | |||||||||||||
Priority | none | Severity | tweak | Reproducibility | have not tried | ||||||||
Status | confirmed | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 1.3.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003810: Some integer literals are cast to bool | ||||||||||||
Description | Some code in Doomseeker uses integer values like 0 or 1 to indicate false / true, instead of those keywords. Not ideal (for readability). Guesstimate some of them were an int type before (like in C89), then converted from int to bool without changing the value itself. An example: Quote from src/core/modreader.h should be written as: Quote from src/core/modreader.h | ||||||||||||
Steps To Reproduce | $ grep -r "bool " src/ | grep "= 1" | wc -l 1 $ grep -r "bool " src/ | grep "= 0" | wc -l 16 $ grep -r "bool " src/ | grep "(1)" | wc -l 0 $ grep -r "bool " src/ | grep "(0)" | wc -l 0 $ grep -r "bool " src/ | grep "? 1" | wc -l 0 $ grep -r "bool " src/ | grep "? 0" | wc -l 0 | ||||||||||||
Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html [^]' | ||||||||||||
Attached Files | |||||||||||||
Notes | |
(0021382) Pol M (developer) 2020-06-07 20:15 |
For some reason, pure virtual/abstract classes are commonly expressed with:= 0; instead of: =false; That should stay like this since everyone does it like this (even though the other way may be more expressive) |
(0021383) Pol M (developer) 2020-06-07 20:18 |
If you find any other case apart from that, you can change it |
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. |
Issue History | |||
Date Modified | Username | Field | Change |
2020-06-07 04:20 | WubTheCaptain | New Issue | |
2020-06-07 04:21 | WubTheCaptain | Priority | normal => none |
2020-06-07 04:25 | WubTheCaptain | Description Updated | View Revisions |
2020-06-07 04:25 | WubTheCaptain | Steps to Reproduce Updated | View Revisions |
2020-06-07 20:15 | Pol M | Note Added: 0021382 | |
2020-06-07 20:18 | Pol M | Note Added: 0021383 | |
2020-06-07 20:18 | Pol M | Status | new => confirmed |
Copyright © 2000 - 2024 MantisBT Team |