aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/shared/Database')
-rw-r--r--src/server/shared/Database/DatabaseWorker.h2
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h4
-rw-r--r--src/server/shared/Database/Implementation/LoginDatabase.h4
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.cpp2
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.h6
-rw-r--r--src/server/shared/Database/MySQLConnection.cpp4
-rw-r--r--src/server/shared/Database/MySQLConnection.h2
-rw-r--r--src/server/shared/Database/PreparedStatement.cpp16
-rw-r--r--src/server/shared/Database/QueryHolder.h4
-rw-r--r--src/server/shared/Database/SQLOperation.h2
-rw-r--r--src/server/shared/Database/Transaction.h6
11 files changed, 19 insertions, 33 deletions
diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h
index 252517e336e..179806d29cb 100644
--- a/src/server/shared/Database/DatabaseWorker.h
+++ b/src/server/shared/Database/DatabaseWorker.h
@@ -33,7 +33,7 @@ class DatabaseWorker : protected ACE_Task_Base
int wait() { return ACE_Task_Base::wait(); }
private:
- DatabaseWorker() : ACE_Task_Base() {}
+ DatabaseWorker() : ACE_Task_Base() { }
ACE_Activation_Queue* m_queue;
MySQLConnection* m_conn;
};
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 4aeee0ac525..aa47fb53097 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -25,8 +25,8 @@ class CharacterDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- CharacterDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- CharacterDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ CharacterDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ CharacterDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h
index abb1e1c7b13..c9d34a26617 100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.h
+++ b/src/server/shared/Database/Implementation/LoginDatabase.h
@@ -25,8 +25,8 @@ class LoginDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- LoginDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- LoginDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ LoginDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ LoginDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp
index 41280471bd4..f27ee2b72e0 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp
@@ -75,8 +75,6 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_INS_CREATURE_TRANSPORT, "INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_CREATURE_TRANSPORT_EMOTE, "UPDATE creature_transport SET emote = ? WHERE transport_entry = ? AND guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH);
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index 171627bb83a..0126cdc3a80 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
@@ -25,8 +25,8 @@ class WorldDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- WorldDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- WorldDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ WorldDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ WorldDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
@@ -95,8 +95,6 @@ enum WorldDatabaseStatements
WORLD_UPD_WAYPOINT_SCRIPT_O,
WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID,
WORLD_DEL_CREATURE,
- WORLD_INS_CREATURE_TRANSPORT,
- WORLD_UPD_CREATURE_TRANSPORT_EMOTE,
WORLD_SEL_COMMANDS,
WORLD_SEL_CREATURE_TEMPLATE,
WORLD_SEL_WAYPOINT_SCRIPT_BY_ID,
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 4307cab98f2..25ffbc18614 100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -41,9 +41,7 @@ m_queue(NULL),
m_worker(NULL),
m_Mysql(NULL),
m_connectionInfo(connInfo),
-m_connectionFlags(CONNECTION_SYNCH)
-{
-}
+m_connectionFlags(CONNECTION_SYNCH) { }
MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) :
m_reconnecting(false),
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h
index 989c447fcd5..656d7917315 100644
--- a/src/server/shared/Database/MySQLConnection.h
+++ b/src/server/shared/Database/MySQLConnection.h
@@ -38,7 +38,7 @@ enum ConnectionFlags
struct MySQLConnectionInfo
{
- MySQLConnectionInfo() {}
+ MySQLConnectionInfo() { }
MySQLConnectionInfo(const std::string& infoString)
{
Tokenizer tokens(infoString, ';');
diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp
index 24097ca41c5..84f1e1b6fd1 100644
--- a/src/server/shared/Database/PreparedStatement.cpp
+++ b/src/server/shared/Database/PreparedStatement.cpp
@@ -21,13 +21,9 @@
PreparedStatement::PreparedStatement(uint32 index) :
m_stmt(NULL),
-m_index(index)
-{
-}
+m_index(index) { }
-PreparedStatement::~PreparedStatement()
-{
-}
+PreparedStatement::~PreparedStatement() { }
void PreparedStatement::BindParameters()
{
@@ -451,16 +447,12 @@ std::string MySQLPreparedStatement::getQueryString(std::string const& sqlPattern
//- Execution
PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt) :
m_stmt(stmt),
-m_has_result(false)
-{
-}
+m_has_result(false) { }
PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt, PreparedQueryResultFuture result) :
m_stmt(stmt),
m_has_result(true),
-m_result(result)
-{
-}
+m_result(result) { }
PreparedStatementTask::~PreparedStatementTask()
diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h
index fd2cbcacbcc..05c9e869290 100644
--- a/src/server/shared/Database/QueryHolder.h
+++ b/src/server/shared/Database/QueryHolder.h
@@ -27,7 +27,7 @@ class SQLQueryHolder
typedef std::pair<SQLElementData, SQLResultSetUnion> SQLResultPair;
std::vector<SQLResultPair> m_queries;
public:
- SQLQueryHolder() {}
+ SQLQueryHolder() { }
~SQLQueryHolder();
bool SetQuery(size_t index, const char *sql);
bool SetPQuery(size_t index, const char *format, ...) ATTR_PRINTF(3, 4);
@@ -49,7 +49,7 @@ class SQLQueryHolderTask : public SQLOperation
public:
SQLQueryHolderTask(SQLQueryHolder *holder, QueryResultHolderFuture res)
- : m_holder(holder), m_result(res){};
+ : m_holder(holder), m_result(res){ };
bool Execute();
};
diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h
index 400355e7c76..d7870a7d22e 100644
--- a/src/server/shared/Database/SQLOperation.h
+++ b/src/server/shared/Database/SQLOperation.h
@@ -59,7 +59,7 @@ class MySQLConnection;
class SQLOperation : public ACE_Method_Request
{
public:
- SQLOperation(): m_conn(NULL) {}
+ SQLOperation(): m_conn(NULL) { }
virtual int call()
{
Execute();
diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h
index 026cc1fdf96..e8e5a743a63 100644
--- a/src/server/shared/Database/Transaction.h
+++ b/src/server/shared/Database/Transaction.h
@@ -33,7 +33,7 @@ class Transaction
friend class DatabaseWorkerPool;
public:
- Transaction() : _cleanedUp(false) {}
+ Transaction() : _cleanedUp(false) { }
~Transaction() { Cleanup(); }
void Append(PreparedStatement* statement);
@@ -59,8 +59,8 @@ class TransactionTask : public SQLOperation
friend class DatabaseWorker;
public:
- TransactionTask(SQLTransaction trans) : m_trans(trans) {} ;
- ~TransactionTask(){};
+ TransactionTask(SQLTransaction trans) : m_trans(trans) { } ;
+ ~TransactionTask(){ };
protected:
bool Execute();