mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11130] Make abstract function with body syntax compatible with GCC.
This commit is contained in:
parent
6d26ec0e7f
commit
d7cf24970a
2 changed files with 8 additions and 6 deletions
|
|
@ -85,11 +85,7 @@ class MapPersistentState
|
|||
void SaveGORespawnTime(uint32 loguid, time_t t);
|
||||
|
||||
protected:
|
||||
virtual bool CanBeUnload() const =0
|
||||
{
|
||||
// prevent unload if used for loaded map
|
||||
return !m_usedByMap;
|
||||
}
|
||||
virtual bool CanBeUnload() const =0; // body provided for subclasses
|
||||
|
||||
bool UnloadIfEmpty();
|
||||
void ClearRespawnTimes();
|
||||
|
|
@ -112,6 +108,12 @@ class MapPersistentState
|
|||
RespawnTimes m_goRespawnTimes; // lock MapPersistentState from unload, for example for temporary bound dungeon unload delay
|
||||
};
|
||||
|
||||
inline bool MapPersistentState::CanBeUnload() const
|
||||
{
|
||||
// prevent unload if used for loaded map
|
||||
return !m_usedByMap;
|
||||
}
|
||||
|
||||
class WorldPersistentState : public MapPersistentState
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11129"
|
||||
#define REVISION_NR "11130"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue