Sourcefile sleanups -> tabs to spaces, remove whitespace - also update the cleanupscripts very slightly
--HG-- branch : trunk
This commit is contained in:
@@ -92,7 +92,7 @@ class DBCStorage
|
||||
query +=" ORDER BY " + *sql->indexName + " DESC";
|
||||
query += ";";
|
||||
|
||||
|
||||
|
||||
result = WorldDatabase.Query(query.c_str());
|
||||
if (result)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
size_t Database::db_count = 0;
|
||||
|
||||
Database::Database() : mMysql(NULL)
|
||||
Database::Database() : mMysql(NULL)
|
||||
{
|
||||
// before first connection
|
||||
if (db_count++ == 0)
|
||||
|
||||
@@ -11,12 +11,12 @@ void PreparedStatementHolder::_prepareStatement(const char* name, const char* sq
|
||||
strcat(query, "'");
|
||||
strcat(query, sql);
|
||||
strcat(query, "'");
|
||||
|
||||
|
||||
DEBUG_LOG("Preparing statement: %s", query);
|
||||
db->Execute(query);
|
||||
|
||||
|
||||
delete[] query;
|
||||
++count;
|
||||
++count;
|
||||
}
|
||||
|
||||
void PreparedStatementHolder::LoadAuthserver(Database *db, uint32 &count)
|
||||
@@ -41,7 +41,7 @@ void PreparedStatementHolder::PExecute(Database *db, const char *name, const cha
|
||||
{
|
||||
// NOTE: if args == NULL, we're crashing here. No need to waste performance on checking;
|
||||
// devs must make sure they use PExecute for args and Execute for no args.
|
||||
|
||||
|
||||
const char prefix[] = "EXECUTE ";
|
||||
size_t querySize = 8 + strlen(name) + 7 + strlen(args) + 1;
|
||||
char* query = new char[querySize];
|
||||
@@ -49,7 +49,7 @@ void PreparedStatementHolder::PExecute(Database *db, const char *name, const cha
|
||||
strcat(query, name);
|
||||
strcat(query, " USING ");
|
||||
strcat(query, args);
|
||||
|
||||
|
||||
DEBUG_LOG("Prepared statement (parsed args): %s", query);
|
||||
db->Execute(query);
|
||||
delete[] query;
|
||||
|
||||
@@ -10,18 +10,18 @@ class PreparedStatementHolder
|
||||
void LoadCharacters(Database *db, uint32 &count);
|
||||
void LoadAuthserver(Database *db, uint32 &count);
|
||||
void LoadWorldserver(Database *db, uint32 &count);
|
||||
|
||||
|
||||
///- Executes prepared statement that doesn't require feedback with name $name on database $db
|
||||
void Execute(Database *db, const char* name);
|
||||
///- Executes prepared statement that doesn't require feedback with name $name and args $args
|
||||
///- Executes prepared statement that doesn't require feedback with name $name and args $args
|
||||
///- on database $db
|
||||
void PExecute(Database *db, const char* name, const char* args);
|
||||
|
||||
|
||||
///- Executes a prepared statement without args on db $db with name $name and puts the result set in a pointer.
|
||||
QueryResult_AutoPtr Query(Database* db, const char* name);
|
||||
///- Executes a prepared statement with args $args on db $db with name $name and put the result set in a pointer.
|
||||
QueryResult_AutoPtr PQuery(Database* db, const char* name, const char* args);
|
||||
|
||||
|
||||
private:
|
||||
void _prepareStatement(const char* name, const char* sql, Database *db, uint32 &count);
|
||||
|
||||
|
||||
@@ -41,12 +41,12 @@ void SqlTransaction::Execute(Database *db)
|
||||
m_Mutex.release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
db->DirectExecute("START TRANSACTION");
|
||||
while (!m_queue.empty())
|
||||
{
|
||||
sql = m_queue.front();
|
||||
|
||||
|
||||
if (!db->DirectExecute(sql))
|
||||
{
|
||||
free((void*)const_cast<char*>(sql));
|
||||
|
||||
@@ -135,10 +135,10 @@ class SqlAsyncTask : public ACE_Method_Request
|
||||
public:
|
||||
SqlAsyncTask(Database * db, SqlOperation * op) : m_db(db), m_op(op){}
|
||||
~SqlAsyncTask()
|
||||
{
|
||||
{
|
||||
if (!m_op)
|
||||
return;
|
||||
|
||||
return;
|
||||
|
||||
delete m_op;
|
||||
m_op = NULL;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class ObjectRegistry
|
||||
}
|
||||
private:
|
||||
RegistryMapType i_registeredObjects;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
Log::Log() :
|
||||
raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL),
|
||||
dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false),
|
||||
dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false),
|
||||
m_enableLogDBLater(false), m_enableLogDB(false), m_colored(false),
|
||||
arenaLogFile(NULL)
|
||||
{
|
||||
|
||||
@@ -120,14 +120,14 @@ namespace ACE_Based
|
||||
{
|
||||
this->_lock.release();
|
||||
}
|
||||
|
||||
|
||||
///! Calls pop_front of the queue
|
||||
void pop_front()
|
||||
{
|
||||
ACE_GUARD (LockType, g, this->_lock);
|
||||
_queue.pop_front();
|
||||
}
|
||||
|
||||
|
||||
///! Checks if we're empty or not with locks held
|
||||
bool empty()
|
||||
{
|
||||
|
||||
@@ -320,7 +320,7 @@ class HookList
|
||||
private:
|
||||
typename std::list<T> m_list;
|
||||
public:
|
||||
HookList<T> & operator+=(T t)
|
||||
HookList<T> & operator+=(T t)
|
||||
{
|
||||
m_list.push_back(t);
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user