Anonymous | Login | Signup for a new account | 2024-04-24 06:20 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 | ||||
0003801 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 01:31 | 2021-08-07 16:52 | ||||
Reporter | WubTheCaptain | ||||||||
Assigned To | WubTheCaptain | ||||||||
Priority | none | Severity | tweak | Reproducibility | always | ||||
Status | closed | Resolution | suspended | ||||||
Platform | OS | OS Version | |||||||
Product Version | 1.3.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003801: new/delete used instead of std::unique_ptr/std::make_unique | ||||||||
Description | I tried to write a coherent description here, but I couldn't? std::unique_ptr seems to be a better practice, instead of new/delete. Since C++11. Doomseeker (and Wadseeker) uses C++98 style new/delete. And std::make_unique seems even better. Since C++14. Let's modernize? | ||||||||
Steps To Reproduce | $ grep -r 'new ' src/ | wc -l 586 $ grep -r 'new\[\]' src/ | wc -l 0 $ grep -r 'delete\[\]' src/ | wc -l 8 $ grep -r 'delete ' src/ | wc -l 180 $ grep -r 'unique_ptr' src/ | wc -l 0 | ||||||||
Additional Information | 'https://en.cppreference.com/w/cpp/memory/unique_ptr [^]' 'https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique [^]' 'https://isocpp.org/wiki/faq/freestore-mgmt [^]' 'https://clang.llvm.org/extra/clang-tidy/checks/modernize-make-unique.html [^]' | ||||||||
Attached Files | |||||||||
Notes | |
(0021376) Pol M (developer) 2020-06-07 19:25 |
While this is a good idea, libraries shouldn't be touched. Also, while smart pointers will work, you could look for alternatives in each case. For instance:
|
(0021465) WubTheCaptain (reporter) 2020-06-16 14:22 |
Should we use std::unique_ptr or Qt's QScopedPointer? Mumble decided to go with STL pointers.'https://github.com/mumble-voip/mumble/issues/3937 [^]' |
(0021466) Pol M (developer) 2020-06-16 23:23 |
Since we are already using QScopedPointer, we should stick to that :) |
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
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:31 | WubTheCaptain | New Issue | |
2020-06-07 02:26 | WubTheCaptain | Steps to Reproduce Updated | View Revisions |
2020-06-07 02:29 | WubTheCaptain | Relationship added | child of 0003803 |
2020-06-07 02:32 | WubTheCaptain | Relationship added | child of 0003804 |
2020-06-07 19:25 | Pol M | Note Added: 0021376 | |
2020-06-07 19:25 | Pol M | Assigned To | => Pol M |
2020-06-07 19:25 | Pol M | Status | new => confirmed |
2020-06-07 19:40 | Pol M | Assigned To | Pol M => |
2020-06-16 14:22 | WubTheCaptain | Note Added: 0021465 | |
2020-06-16 14:22 | WubTheCaptain | Status | confirmed => acknowledged |
2020-06-16 23:23 | Pol M | Note Added: 0021466 | |
2020-06-17 08:24 | WubTheCaptain | Status | acknowledged => resolved |
2020-06-17 08:24 | WubTheCaptain | Resolution | open => suspended |
2020-06-17 08:24 | WubTheCaptain | Assigned To | => WubTheCaptain |
2021-08-07 16:52 | Blzut3 | Status | resolved => closed |
Copyright © 2000 - 2024 MantisBT Team |