Anonymous | Login | Signup for a new account | 2025-06-18 15:05 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 | ||||||||
0003800 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 01:07 | 2020-06-07 21:23 | ||||||||
Reporter | WubTheCaptain | ||||||||||||
Assigned To | |||||||||||||
Priority | none | Severity | tweak | Reproducibility | always | ||||||||
Status | acknowledged | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 1.3.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003800: C-style arrays in C++ source files | ||||||||||||
Description | C++11 introduced std::array<>. Doomseeker (and Wadseeker) use C-style arrays (inherited in C++98). clang-tidy complains about C-style arrays in C++ source (with exceptions in main() and extern "C"). Let's modernize to C++11 and beyond? | ||||||||||||
Steps To Reproduce | $ grep -r "\[\]" src/ | wc -l 119 $ grep -r '\[.*\]' src/ | wc -l 2745 $ grep -r "std::vector" src/ | wc -l 0 $ grep -r "std::array" src/ | wc -l 0 $ grep -r 'array ' src/core | wc -l 8 $ grep -r 'vector ' src/core | wc -l 0 Side-note: I did not consider new[] or delete[] in these results, which are expected from C++. | ||||||||||||
Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/modernize-avoid-c-arrays.html [^]' 'https://en.cppreference.com/w/cpp/header/array [^]' I couldn't find a reference in C++ standards (drafts) that C-style arrays would be deprecated syntax (unlike some other deprecated features inherited by the C++ language from the C language). | ||||||||||||
Attached Files | |||||||||||||
![]() |
||||||
|
![]() |
|
WubTheCaptain (reporter) 2020-06-07 01:08 |
and std::vector<> |
WubTheCaptain (reporter) 2020-06-07 04:12 |
may need to be checked after for'https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html [^]' |
Pol M (developer) 2020-06-07 20:02 |
I could not find a Qt counterpart to std::array. Also, C arrays are not bad by itself, so I'm not too sure about pulling the trigger on this one. |
Pol M (developer) 2020-06-07 21:23 |
From what I see it seems to be common practice, so I'll give my support :) |
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 01:07 | WubTheCaptain | New Issue | |
2020-06-07 01:07 | WubTheCaptain | Description Updated | View Revisions |
2020-06-07 01:08 | WubTheCaptain | Note Added: 0021357 | |
2020-06-07 02:29 | WubTheCaptain | Relationship added | child of 0003803 |
2020-06-07 04:12 | WubTheCaptain | Note Added: 0021363 | |
2020-06-07 20:02 | Pol M | Note Added: 0021381 | |
2020-06-07 21:23 | Pol M | Note Added: 0021394 | |
2020-06-07 21:23 | Pol M | Status | new => acknowledged |
Copyright © 2000 - 2025 MantisBT Team |