Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003800Doomseeker[All Projects] Cleanuppublic2020-06-07 01:072020-06-07 21:23
ReporterWubTheCaptain 
Assigned To 
PrioritynoneSeveritytweakReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version1.3.1 
Target VersionFixed in Version 
Summary0003800: C-style arrays in C++ source files
DescriptionC++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

- Relationships
child of 0003803confirmed C++11 support 

-  Notes
User avatar (0021357)
WubTheCaptain (reporter)
2020-06-07 01:08

and std::vector<>
User avatar (0021363)
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 [^]'
User avatar (0021381)
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.
User avatar (0021394)
Pol M (developer)
2020-06-07 21:23

From what I see it seems to be common practice, so I'll give my support :)

Issue Community 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.

- Issue History
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






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker