| Anonymous | Login | Signup for a new account | 2025-10-24 07: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 | ||||||||
| 0003813 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 05:02 | 2020-06-07 20:32 | ||||||||
| 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 | 0003813: C style "typedef" is used instead of C++ style "using" keyword (C++11) | ||||||||||||
| Description | Another thing borrowed by C++98 from the C language (be it C89, C95 or C99): typedef keyword. Doomseeker uses C++, so I expect to not see C in the source codes (however compatible and not deprecated). Instead, the using keyword would be modern C++. Introduced in C++11. | ||||||||||||
| Steps To Reproduce | rep -r "typedef" src/ | less can be of interest. Excluding some LZMA dependencies, hand-filtered results:src/plugins/chocolate-doom/chocolatedoomgameinfo.h:typedef enum src/plugins/chocolate-doom/chocolatedoomgameinfo.h:typedef enum src/core/gui/demomanager.cpp: typedef QMap<int, Demo> DemoMap; src/core/ip2c/ip2cparser.h: typedef QHash<QString, QList<IP2C::IP2CData> > Countries; src/core/ip2c/ip2cparser.h: typedef QHash<QString, QList<IP2C::IP2CData> >::iterator CountriesIt; src/core/ip2c/ip2cparser.h: typedef QHash<QString, QList<IP2C::IP2CData> >::const_iterator CountriesConstIt; src/core/refresher/refresher.cpp: typedef QHash<MasterClient *, MasterClientInfo *> MasterHashtable; src/core/refresher/refresher.cpp: typedef QHash<MasterClient *, MasterClientInfo *>::iterator MasterHashtableIt; src/core/serverapi/serverptr.h: * ServerPtr typedefs declarations. src/core/serverapi/playerslist.h:typedef QMap<int, PlayersList> PlayersByTeams; I hope I interpreted this right. (One is a comment line.) | ||||||||||||
| Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.html [^]' 'https://en.cppreference.com/w/cpp/language/type_alias [^]' 'https://stackoverflow.com/a/10748056 [^]' | ||||||||||||
| Attached Files | |||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
Pol M (developer) 2020-06-07 20:32 |
If the typedef is not part of a C file (whether it is *.c or a header *.h of a C library), using is better. The usual, do not change libraries etc :) |
| 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 05:02 | WubTheCaptain | New Issue | |
| 2020-06-07 05:03 | WubTheCaptain | Relationship added | child of 0003803 |
| 2020-06-07 20:32 | Pol M | Note Added: 0021386 | |
| 2020-06-07 20:32 | Pol M | Status | new => confirmed |
| Copyright © 2000 - 2025 MantisBT Team |