Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources

This commit is contained in:
ariel- committed 2018-03-28 04:41:59 -03:00
1 parent 7fff6c424f
commit 5ff847159c
1243 files changed
+29780 -36517

No files matched your search

+15 -14
View File
@@ -16,14 +16,15 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Common.h"
#include "PlayerDump.h"
#include "DatabaseEnv.h"
#include "UpdateFields.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "AccountMgr.h"
#include "CharacterCache.h"
#include "Common.h"
#include "DatabaseEnv.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "UpdateFields.h"
#include "World.h"
// static data
@@ -419,7 +420,7 @@ inline std::string GetTableName(std::string const& str)
{
// length of "INSERT INTO `"
static std::string::size_type const s = 13;
std::string::size_type e = str.find(_TABLE_SIM_, s);
std::string::size_type e = str.find('`', s);
if (e == std::string::npos)
return "";
@@ -442,7 +443,7 @@ inline bool ValidateFields(TableStruct const& ts, std::string const& str, size_t
s += 4;
std::string::size_type valPos = str.find("VALUES ('");
std::string::size_type e = str.find(_TABLE_SIM_, s);
std::string::size_type e = str.find('`', s);
if (e == std::string::npos || valPos == std::string::npos)
{
TC_LOG_ERROR("misc", "LoadPlayerDump: (line " UI64FMTD ") unexpected end of line", lineNumber);
@@ -461,7 +462,7 @@ inline bool ValidateFields(TableStruct const& ts, std::string const& str, size_t
// length of "`, `"
s = e + 4;
e = str.find(_TABLE_SIM_, s);
e = str.find('`', s);
} while (e < valPos);
return true;
@@ -523,10 +524,10 @@ inline void AppendTableDump(StringTransaction& trans, TableStruct const& tableSt
do
{
std::ostringstream ss;
ss << "INSERT INTO " << _TABLE_SIM_ << tableStruct.TableName << _TABLE_SIM_ << " (";
ss << "INSERT INTO `" << tableStruct.TableName << "` (";
for (auto itr = tableStruct.TableFields.begin(); itr != tableStruct.TableFields.end();)
{
ss << _TABLE_SIM_ << itr->FieldName << _TABLE_SIM_;
ss << '`' << itr->FieldName << '`';
++itr;
if (itr != tableStruct.TableFields.end())
@@ -544,7 +545,7 @@ inline void AppendTableDump(StringTransaction& trans, TableStruct const& tableSt
// null pointer -> we have null
if (!cString)
ss << "'NULL'";
ss << "'nullptr'";
else
{
std::string s(cString);
@@ -745,11 +746,11 @@ DumpReturn PlayerDumpWriter::WriteDump(std::string const& file, ObjectGuid::LowT
// Reading - High-level functions
inline void FixNULLfields(std::string& line)
{
static std::string const NullString("'NULL'");
static std::string const NullString("'nullptr'");
size_t pos = line.find(NullString);
while (pos != std::string::npos)
{
line.replace(pos, NullString.length(), "NULL");
line.replace(pos, NullString.length(), "nullptr");
pos = line.find(NullString);
}
}
@@ -908,7 +909,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
break;
case GUID_TYPE_NULL:
{
static std::string const NullString("NULL");
static std::string const NullString("nullptr");
if (!ChangeColumn(ts, line, field.FieldName, NullString))
return DUMP_FILE_BROKEN;
break;