-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some more code cleanup and refactoring #2842
Some more code cleanup and refactoring #2842
Conversation
src/game/World.h
Outdated
public: | ||
SessionPacketSendTask(const SessionPacketSendTask&) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
east const
@@ -491,7 +491,7 @@ void DungeonResetScheduler::ScheduleAllDungeonResets() | |||
} | |||
} | |||
|
|||
void DungeonResetScheduler::ScheduleReset(bool add, time_t time, DungeonResetEvent event) | |||
void DungeonResetScheduler::ScheduleReset(bool add, time_t const time, DungeonResetEvent event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a pointer so no need for the time parameter to be const
@@ -300,7 +300,7 @@ class DungeonResetScheduler | |||
m_resetTimeByMapId[mapId] = t; | |||
} | |||
|
|||
void ScheduleReset(bool add, time_t time, DungeonResetEvent event); | |||
void ScheduleReset(bool add, time_t const time, DungeonResetEvent event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for time to be const
@@ -215,7 +215,7 @@ Creature::Creature(CreatureSubtype subtype) : | |||
|
|||
Creature::~Creature() | |||
{ | |||
CleanupsBeforeDelete(); | |||
Unit::CleanupsBeforeDelete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why explicitly calling unit version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for readability - there's no specific implementation for CleanupsBeforeDelete at creature (while at player there is, which then also calls Unit::CleanupsBeforeDelete).
🍰 Pullrequest
Code cleanup and some fixes based on Clang-Tidy suggestions.
Also resolved some compiler warnings.
No behavioural changes.
Proof
Issues
How2Test
Todo / Checklist