MantisBT - Doomseeker |
| View Issue Details |
|
| 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). |
| Tags | No tags attached. |
| Relationships | | child of | 0003803 | confirmed | | C++11 support |
|
| Attached Files | |
|
| Issue History |
| Date Modified | Username | Field | Change |
| 2020-06-07 01:07 | WubTheCaptain | New Issue | |
| 2020-06-07 01:07 | WubTheCaptain | Description Updated | bug_revision_view_page.php?rev_id=13105#r13105 |
| 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 |