mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-01 01:16:03 -04:00
Merge branch 'testing' into clang-profile-build
This commit is contained in:
@@ -152,8 +152,6 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/SwgDatabaseServer.profdata)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/buffers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/core
|
||||
@@ -295,8 +293,8 @@ add_custom_command(
|
||||
)
|
||||
|
||||
add_executable(SwgDatabaseServer
|
||||
${SHARED_SOURCES}
|
||||
${PLATFORM_SOURCES}
|
||||
${SHARED_SOURCES}
|
||||
${PLATFORM_SOURCES}
|
||||
${SCHEMA_H_OUTPUT}
|
||||
${ENCODER_CPP_OUTPUT}
|
||||
${DECODER_CPP_OUTPUT}
|
||||
|
||||
@@ -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)
|
||||
@@ -62,16 +64,14 @@ bool ObjvarBuffer::load(DB::Session *session,const DB::TagSet &tags, const std::
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
IndexKey key(row->object_id.getValue(), row->name_id.getValue());
|
||||
ObjvarValue value;
|
||||
value.m_type=row->type.getValue();
|
||||
|
||||
// The string is stored in the database as utf8, so a wide-to-narrow is appropriate
|
||||
value.m_value=Unicode::wideToNarrow(row->value.getValue());
|
||||
|
||||
value.m_detached=false;
|
||||
|
||||
IndexKey key(row->object_id.getValue(), row->name_id.getValue());
|
||||
ObjvarValue value;
|
||||
value.m_type=row->type.getValue();
|
||||
|
||||
// The string is stored in the database as utf8, so a wide-to-narrow is appropriate
|
||||
value.m_value=Unicode::wideToNarrow(row->value.getValue());
|
||||
|
||||
m_data.insert(std::make_pair(key,value));
|
||||
}
|
||||
}
|
||||
@@ -312,8 +312,9 @@ void ObjvarBuffer::updateObjvars(const NetworkId &objectId, const std::vector<Dy
|
||||
}
|
||||
|
||||
row->second.m_type = i->value.getType();
|
||||
row->second.m_detached = true;
|
||||
row->second.m_detached = true; //why the fuck even store it at this point?
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -330,9 +331,12 @@ void ObjvarBuffer::updateObjvars(const NetworkId &objectId, const std::vector<Dy
|
||||
void ObjvarBuffer::removeObject(const NetworkId &object)
|
||||
{
|
||||
DataType::iterator i=m_data.lower_bound(IndexKey(object,0));
|
||||
while (i!=m_data.end() && i->first.m_objectId==object)
|
||||
while (i!=m_data.end())
|
||||
{
|
||||
i = m_data.erase(i);
|
||||
if (i->first.m_objectId==object)
|
||||
i = m_data.erase(i);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
private:
|
||||
struct IndexKey
|
||||
{
|
||||
NetworkId m_objectId;
|
||||
const NetworkId m_objectId;
|
||||
int m_nameId;
|
||||
|
||||
IndexKey(const NetworkId &objectId, int nameId);
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@ void SwgDatabaseServer::run()
|
||||
|
||||
DataCleanupManager cleanupManager;
|
||||
cleanupManager.runDailyCleanup();
|
||||
|
||||
|
||||
|
||||
DatabaseProcess::run();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,9 @@ SwgSnapshot::SwgSnapshot(DB::ModeQuery::Mode mode, bool useGoldDatabase) :
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SwgSnapshot::~SwgSnapshot(){}
|
||||
SwgSnapshot::~SwgSnapshot(){
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
void newMissionObject (NetworkId const & objectId);
|
||||
void newPlanetObject (NetworkId const & objectId);
|
||||
void newPlayerObject (NetworkId const & objectId);
|
||||
void newPlayerQuestObject (NetworkId const & objectId);
|
||||
void newPlayerQuestObject (NetworkId const & objectId);
|
||||
void newRegionCircleObject (NetworkId const & objectId);
|
||||
void newRegionObject (NetworkId const & objectId);
|
||||
void newRegionRectangleObject (NetworkId const & objectId);
|
||||
|
||||
Reference in New Issue
Block a user