This commit is contained in:
DarthArgus
2016-12-06 16:58:56 +00:00
parent c8b782b0d1
commit b17393763a
4 changed files with 13 additions and 6 deletions
@@ -602,6 +602,9 @@ void Persister::saveCompleted(Snapshot *completedSnapshot)
SnapshotListType::iterator i=std::remove(m_savingSnapshots.begin(),m_savingSnapshots.end(),completedSnapshot);
if (i!=m_savingSnapshots.end())
{
delete completedSnapshot;
completedSnapshot = nullptr;
m_savingSnapshots.erase(i, m_savingSnapshots.end());
if (m_savingSnapshots.empty() && ConfigServerDatabase::getReportSaveTimes())
{
@@ -634,7 +637,9 @@ void Persister::saveCompleted(Snapshot *completedSnapshot)
{
SnapshotListType::iterator j=std::remove(m_savingCharacterSnapshots.begin(),m_savingCharacterSnapshots.end(),completedSnapshot);
DEBUG_FATAL(i==m_savingCharacterSnapshots.end(),("Programmer bug: SaveCompleted() called with a snapshot that wasn't in m_savingSnapshots or m_savingCharacterSnapshots."));
delete completedSnapshot;
completedSnapshot = nullptr;
m_savingCharacterSnapshots.erase(j, m_savingCharacterSnapshots.end());
DEBUG_REPORT_LOG(ConfigServerDatabase::getReportSaveTimes(),("New character save completed\n"));
}
@@ -38,6 +38,8 @@ ObjvarBuffer::ObjvarBuffer(DB::ModeQuery::Mode mode, ObjectTableBuffer *objectTa
ObjvarBuffer::~ObjvarBuffer()
{
m_data.clear();
m_overrides.clear();
}
bool ObjvarBuffer::load(DB::Session *session,const DB::TagSet &tags, const std::string &schema, bool usingGoldDatabase)
@@ -60,7 +60,7 @@ public:
NetworkId m_objectId;
int m_nameId;
IndexKey(const NetworkId &objectId, int nameId);
IndexKey(const NetworkId objectId, int nameId);
bool operator==(const IndexKey &rhs) const;
bool operator<(const IndexKey &rhs) const;
};
@@ -92,9 +92,7 @@ public:
// ======================================================================
inline ObjvarBuffer::IndexKey::IndexKey(const NetworkId &objectId, int nameId) :
m_objectId(objectId),
m_nameId(nameId)
inline ObjvarBuffer::IndexKey::IndexKey(const NetworkId objectId, int nameId) : m_objectId(objectId), m_nameId(nameId)
{
}
@@ -139,7 +139,9 @@ SwgSnapshot::SwgSnapshot(DB::ModeQuery::Mode mode, bool useGoldDatabase) :
// ----------------------------------------------------------------------
SwgSnapshot::~SwgSnapshot(){}
SwgSnapshot::~SwgSnapshot(){
}
// ----------------------------------------------------------------------