-
Notifications
You must be signed in to change notification settings - Fork 503
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,7 +276,7 @@ struct DungeonResetEvent | |
DungeonResetEvent(ResetEventType t, uint32 _mapid, uint32 _instanceid) | ||
: type(t), mapId(_mapid), instanceId(_instanceid) {} | ||
|
||
bool operator == (DungeonResetEvent const& e) { return e.mapId == mapId && e.instanceId == instanceId; } | ||
bool operator==(DungeonResetEvent const& e) const { return e.mapId == mapId && e.instanceId == instanceId; } | ||
}; | ||
|
||
typedef std::map<uint32, std::pair<uint32, time_t> > ResetTimeMapType; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. no need for time to be const |
||
|
||
void Update(); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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). |
||
|
||
m_vendorItemCounts.clear(); | ||
|
||
|
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