Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
This commit is contained in:
Vincent-Michael committed 2013-09-22 15:31:21 +02:00
commit f2dff3da38
26 files changed
+960 -51

No files matched your search

-5
View File
@@ -55,11 +55,6 @@
# error "FATAL ERROR: Unknown compiler."
#endif
#if COMPILER == COMPILER_MICROSOFT
# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data
# pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information
#endif
#if defined(__cplusplus) && __cplusplus == 201103L
# define COMPILER_HAS_CPP11_SUPPORT 1
#else
@@ -214,6 +214,9 @@ class DatabaseWorkerPool
T* t = GetFreeConnection();
t->Execute(stmt);
t->Unlock();
//! Delete proxy-class. Not needed anymore
delete stmt;
}
/**
@@ -430,7 +433,7 @@ class DatabaseWorkerPool
*/
//! Automanaged (internally) pointer to a prepared statement object for usage in upper level code.
//! Pointer is deleted in this->Query(PreparedStatement*) or PreparedStatementTask::~PreparedStatementTask.
//! Pointer is deleted in this->DirectExecute(PreparedStatement*), this->Query(PreparedStatement*) or PreparedStatementTask::~PreparedStatementTask.
//! This object is not tied to the prepared statement on the MySQL context yet until execution.
PreparedStatement* GetPreparedStatement(uint32 index)
{
+33
View File
@@ -20,6 +20,7 @@
#define _UTIL_H
#include "Define.h"
#include "Errors.h"
#include <algorithm>
#include <string>
@@ -532,4 +533,36 @@ public:
}
};
enum ComparisionType
{
COMP_TYPE_EQ = 0,
COMP_TYPE_HIGH,
COMP_TYPE_LOW,
COMP_TYPE_HIGH_EQ,
COMP_TYPE_LOW_EQ,
COMP_TYPE_MAX
};
template <class T>
bool CompareValues(ComparisionType type, T val1, T val2)
{
switch (type)
{
case COMP_TYPE_EQ:
return val1 == val2;
case COMP_TYPE_HIGH:
return val1 > val2;
case COMP_TYPE_LOW:
return val1 < val2;
case COMP_TYPE_HIGH_EQ:
return val1 >= val2;
case COMP_TYPE_LOW_EQ:
return val1 <= val2;
default:
// incorrect parameter
ASSERT(false);
return false;
}
}
#endif