| Anonymous | Login | Signup for a new account | 2025-11-11 09:35 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 | ||||||||
| 0003818 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 07:18 | 2020-06-07 21:04 | ||||||||
| Reporter | WubTheCaptain | ||||||||||||
| Assigned To | |||||||||||||
| Priority | none | Severity | trivial | Reproducibility | random | ||||||||
| Status | confirmed | Resolution | open | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | 1.3.1 | ||||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0003818: Boolean expressions involving boolean constants (instead of expressing the boolean expression directly) | ||||||||||||
| Description | Elementary and pedantic about code style. if (b == true) becomes if (b), and so on. This has been quite well followed, with only a few exceptions. I will also agree something like bool ZandronumVersion::operator> (const ZandronumVersion &other) const is better written the way it is. | ||||||||||||
| Steps To Reproduce | These are difficult to find with a text search and due to rarity, so I'll just point out one.src/core/tests/testdatapaths.cpp: } while (bEntryDoesExist == true); Fortunately (or unfortunately), that's also part of the code that has rotten un(der)utilized. Maybe this: Quote from src/core/fileutils.cpp Few more that I could find with grep -B 2 -A 2 -r 'return false' src/ | less. | ||||||||||||
| Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/readability-simplify-boolean-expr.html [^]' | ||||||||||||
| Attached Files | |||||||||||||
Notes |
|
|
Pol M (developer) 2020-06-07 21:04 |
Yep. The src/core/fileutils.cpp example could use the <algorithm> std::find/std::find_if (as suggested by Qt himself as qFind seems deprecated)'https://doc.qt.io/qt-5/qtalgorithms.html#qt-and-the-stl-algorithms [^]' |
| 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 07:18 | WubTheCaptain | New Issue | |
| 2020-06-07 07:19 | WubTheCaptain | Steps to Reproduce Updated | View Revisions |
| 2020-06-07 21:04 | Pol M | Note Added: 0021392 | |
| 2020-06-07 21:04 | Pol M | Status | new => confirmed |
| Copyright © 2000 - 2025 MantisBT Team |