mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +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);
|
void SaveGORespawnTime(uint32 loguid, time_t t);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool CanBeUnload() const =0
|
virtual bool CanBeUnload() const =0; // body provided for subclasses
|
||||||
{
|
|
||||||
// prevent unload if used for loaded map
|
|
||||||
return !m_usedByMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UnloadIfEmpty();
|
bool UnloadIfEmpty();
|
||||||
void ClearRespawnTimes();
|
void ClearRespawnTimes();
|
||||||
|
|
@ -112,6 +108,12 @@ class MapPersistentState
|
||||||
RespawnTimes m_goRespawnTimes; // lock MapPersistentState from unload, for example for temporary bound dungeon unload delay
|
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
|
class WorldPersistentState : public MapPersistentState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11129"
|
#define REVISION_NR "11130"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue