server
server copied to clipboard
🔨 Death to raw operator `new`
I affirm:
- [x] I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
- [x] I have read and understood the Contributing Guide and the Code of Conduct.
- [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.
Describe the feature
I was looking at Teo's PR: https://github.com/LandSandBoat/server/pull/5163 and it struck me how we still have a lot of use of new
. We have the capacity to use unique_ptr
, but that's very verbose. I propose we template the pushPacket
call and forward the args.
A la:
PChar->pushPacket<CMessageBasicPacket>(PChar, PChar, 0, 0, MSGBASIC_CANNOT_USE_IN_AREA);
propose we template the pushPacket call and forward the args.
oh yes please