diff --git a/data/sql/updates/pending_db_world/rev_1574110895514398814.sql b/data/sql/updates/pending_db_world/rev_1574110895514398814.sql
new file mode 100644
index 000000000..6df4c6205
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1574110895514398814.sql
@@ -0,0 +1,3 @@
+INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1574110895514398814');
+
+RENAME TABLE `trinity_string` TO `acore_string`;
diff --git a/src/cmake/showoptions.cmake b/src/cmake/showoptions.cmake
index cd9a19905..7d10b7f70 100644
--- a/src/cmake/showoptions.cmake
+++ b/src/cmake/showoptions.cmake
@@ -60,7 +60,7 @@ endif()
if( WITH_COREDEBUG )
message("* Use coreside debug : Yes")
- add_definitions(-DTRINITY_DEBUG)
+ add_definitions(-DACORE_DEBUG)
else()
message("* Use coreside debug : No (default)")
endif()
diff --git a/src/common/AutoPtr.h b/src/common/AutoPtr.h
index 4986044a5..c37cefa7b 100644
--- a/src/common/AutoPtr.h
+++ b/src/common/AutoPtr.h
@@ -4,12 +4,12 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef _TRINITY_AUTO_PTR_H
-#define _TRINITY_AUTO_PTR_H
+#ifndef _ACORE_AUTO_PTR_H
+#define _ACORE_AUTO_PTR_H
#include
-namespace Trinity
+namespace acore
{
template
@@ -37,6 +37,6 @@ public:
}
};
-} // namespace Trinity
+} // namespace acore
#endif
diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp
index 5d7b6d241..bd1c2ad7a 100644
--- a/src/common/Collision/Management/MMapManager.cpp
+++ b/src/common/Collision/Management/MMapManager.cpp
@@ -93,7 +93,7 @@ namespace MMAP
bool MMapManager::loadMap(uint32 mapId, int32 x, int32 y)
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
// make sure the mmap is loaded and ready to load tiles
if(!loadMapData(mapId))
@@ -161,7 +161,7 @@ namespace MMAP
dtStatus stat;
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
stat = mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef);
}
@@ -188,7 +188,7 @@ namespace MMAP
bool MMapManager::unloadMap(uint32 mapId, int32 x, int32 y)
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
// check if we have this map loaded
if (loadedMMaps.find(mapId) == loadedMMaps.end())
@@ -217,7 +217,7 @@ namespace MMAP
dtStatus status;
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
status = mmap->navMesh->removeTile(tileRef, NULL, NULL);
}
@@ -245,7 +245,7 @@ namespace MMAP
bool MMapManager::unloadMap(uint32 mapId)
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
if (loadedMMaps.find(mapId) == loadedMMaps.end())
{
@@ -265,7 +265,7 @@ namespace MMAP
dtStatus status;
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
status = mmap->navMesh->removeTile(i->second, NULL, NULL);
}
@@ -291,7 +291,7 @@ namespace MMAP
bool MMapManager::unloadMapInstance(uint32 mapId, uint32 instanceId)
{
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
// check if we have this map loaded
if (loadedMMaps.find(mapId) == loadedMMaps.end())
@@ -326,7 +326,7 @@ namespace MMAP
dtNavMesh const* MMapManager::GetNavMesh(uint32 mapId)
{
// pussywizard: moved to calling function
- //TRINITY_READ_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ //ACORE_READ_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
if (loadedMMaps.find(mapId) == loadedMMaps.end())
return NULL;
@@ -337,7 +337,7 @@ namespace MMAP
dtNavMeshQuery const* MMapManager::GetNavMeshQuery(uint32 mapId, uint32 instanceId)
{
// pussywizard: moved to calling function
- //TRINITY_READ_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
+ //ACORE_READ_GUARD(ACE_RW_Thread_Mutex, MMapManagerLock);
if (loadedMMaps.find(mapId) == loadedMMaps.end())
return NULL;
@@ -346,7 +346,7 @@ namespace MMAP
if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end())
{
// pussywizard: different instances of the same map shouldn't access this simultaneously
- TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
+ ACORE_WRITE_GUARD(ACE_RW_Thread_Mutex, GetMMapLock(mapId));
// check again after acquiring mutex
if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end())
{
diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp
index ce641cce4..991b8d877 100644
--- a/src/common/Collision/Management/VMapManager2.cpp
+++ b/src/common/Collision/Management/VMapManager2.cpp
@@ -262,7 +262,7 @@ namespace VMAP
WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
{
//! Critical section, thread safe access to iLoadedModelFiles
- TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
+ ACORE_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
@@ -287,7 +287,7 @@ namespace VMAP
void VMapManager2::releaseModelInstance(const std::string &filename)
{
//! Critical section, thread safe access to iLoadedModelFiles
- TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
+ ACORE_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
diff --git a/src/common/Common.h b/src/common/Common.h
index 3e1f698ef..f5f331ce3 100644
--- a/src/common/Common.h
+++ b/src/common/Common.h
@@ -193,23 +193,23 @@ typedef std::vector StringVector;
#define MAX_QUERY_LEN 32*1024
-#define TRINITY_GUARD(MUTEX, LOCK) \
- ACE_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
- if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+#define ACORE_GUARD(MUTEX, LOCK) \
+ ACE_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
+ if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
//! For proper implementation of multiple-read, single-write pattern, use
//! ACE_RW_Mutex as underlying @MUTEX
-# define TRINITY_WRITE_GUARD(MUTEX, LOCK) \
- ACE_Write_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
- if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+# define ACORE_WRITE_GUARD(MUTEX, LOCK) \
+ ACE_Write_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
+ if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
//! For proper implementation of multiple-read, single-write pattern, use
//! ACE_RW_Mutex as underlying @MUTEX
-# define TRINITY_READ_GUARD(MUTEX, LOCK) \
- ACE_Read_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
- if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+# define ACORE_READ_GUARD(MUTEX, LOCK) \
+ ACE_Read_Guard< MUTEX > ACORE_GUARD_OBJECT (LOCK); \
+ if (ACORE_GUARD_OBJECT.locked() == 0) ASSERT(false);
-namespace ACORE
+namespace acore
{
template
struct unary_function
diff --git a/src/common/CompilerDefs.h b/src/common/CompilerDefs.h
index 772a39e4e..9d99d1ddc 100644
--- a/src/common/CompilerDefs.h
+++ b/src/common/CompilerDefs.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_COMPILERDEFS_H
-#define TRINITY_COMPILERDEFS_H
+#ifndef ACORE_COMPILERDEFS_H
+#define ACORE_COMPILERDEFS_H
#define AC_PLATFORM_WINDOWS 0
#define AC_PLATFORM_UNIX 1
diff --git a/src/common/Configuration/Config.h b/src/common/Configuration/Config.h
index 333d10317..103fd2c1c 100644
--- a/src/common/Configuration/Config.h
+++ b/src/common/Configuration/Config.h
@@ -15,7 +15,7 @@
#include
#include
-typedef Trinity::AutoPtr Config;
+typedef acore::AutoPtr Config;
class ConfigMgr
{
diff --git a/src/common/Containers.h b/src/common/Containers.h
index a5aa39c8d..047ea5fb9 100644
--- a/src/common/Containers.h
+++ b/src/common/Containers.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_CONTAINERS_H
-#define TRINITY_CONTAINERS_H
+#ifndef ACORE_CONTAINERS_H
+#define ACORE_CONTAINERS_H
#include "Define.h"
#include
@@ -13,7 +13,7 @@
//! Because circular includes are bad
extern uint32 urand(uint32 min, uint32 max);
-namespace Trinity
+namespace acore
{
namespace Containers
{
@@ -56,6 +56,6 @@ namespace Trinity
}
//! namespace Containers
}
-//! namespace Trinity
+//! namespace acore
-#endif //! #ifdef TRINITY_CONTAINERS_H
+#endif //! #ifdef ACORE_CONTAINERS_H
diff --git a/src/common/Database/DatabaseWorkerPool.cpp b/src/common/Database/DatabaseWorkerPool.cpp
index cd0421422..53b79d7d3 100644
--- a/src/common/Database/DatabaseWorkerPool.cpp
+++ b/src/common/Database/DatabaseWorkerPool.cpp
@@ -212,7 +212,7 @@ SQLTransaction DatabaseWorkerPool::BeginTransaction()
template
void DatabaseWorkerPool::CommitTransaction(SQLTransaction transaction)
{
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
//! Only analyze transaction weaknesses in Debug mode.
//! Ideally we catch the faults in Debug mode and then correct them,
//! so there's no need to waste these CPU cycles in Release mode.
@@ -227,7 +227,7 @@ void DatabaseWorkerPool::CommitTransaction(SQLTransaction transaction)
default:
break;
}
- #endif // TRINITY_DEBUG
+ #endif // ACORE_DEBUG
Enqueue(new TransactionTask(transaction));
}
diff --git a/src/common/Database/DatabaseWorkerPool.h b/src/common/Database/DatabaseWorkerPool.h
index 53f46ce5d..f574acc3d 100644
--- a/src/common/Database/DatabaseWorkerPool.h
+++ b/src/common/Database/DatabaseWorkerPool.h
@@ -57,10 +57,10 @@ class DatabaseWorkerPool
template
void PExecute(Format&& sql, Args&&... args)
{
- if (ACORE::IsFormatEmptyOrNull(sql))
+ if (acore::IsFormatEmptyOrNull(sql))
return;
- Execute(ACORE::StringFormat(std::forward(sql), std::forward(args)...).c_str());
+ Execute(acore::StringFormat(std::forward(sql), std::forward(args)...).c_str());
}
//! Enqueues a one-way SQL operation in prepared statement format that will be executed asynchronously.
@@ -80,10 +80,10 @@ class DatabaseWorkerPool
template
void DirectPExecute(Format&& sql, Args&&... args)
{
- if (ACORE::IsFormatEmptyOrNull(sql))
+ if (acore::IsFormatEmptyOrNull(sql))
return;
- DirectExecute(ACORE::StringFormat(std::forward(sql), std::forward(args)...).c_str());
+ DirectExecute(acore::StringFormat(std::forward(sql), std::forward(args)...).c_str());
}
//! Directly executes a one-way SQL operation in prepared statement format, that will block the calling thread until finished.
@@ -103,10 +103,10 @@ class DatabaseWorkerPool
template
QueryResult PQuery(Format&& sql, T* conn, Args&&... args)
{
- if (ACORE::IsFormatEmptyOrNull(sql))
+ if (acore::IsFormatEmptyOrNull(sql))
return QueryResult(nullptr);
- return Query(ACORE::StringFormat(std::forward(sql), std::forward(args)...).c_str(), conn);
+ return Query(acore::StringFormat(std::forward(sql), std::forward(args)...).c_str(), conn);
}
//! Directly executes an SQL query in string format -with variable args- that will block the calling thread until finished.
@@ -114,10 +114,10 @@ class DatabaseWorkerPool
template
QueryResult PQuery(Format&& sql, Args&&... args)
{
- if (ACORE::IsFormatEmptyOrNull(sql))
+ if (acore::IsFormatEmptyOrNull(sql))
return QueryResult(nullptr);
- return Query(ACORE::StringFormat(std::forward(sql), std::forward(args)...).c_str());
+ return Query(acore::StringFormat(std::forward(sql), std::forward(args)...).c_str());
}
//! Directly executes an SQL query in prepared format that will block the calling thread until finished.
@@ -138,10 +138,10 @@ class DatabaseWorkerPool
template
QueryResultFuture AsyncPQuery(Format&& sql, Args&&... args)
{
- if (ACORE::IsFormatEmptyOrNull(sql))
+ if (acore::IsFormatEmptyOrNull(sql))
return QueryResult(nullptr);
- return AsyncQuery(ACORE::StringFormat(std::forward(sql), std::forward(args)...).c_str());
+ return AsyncQuery(acore::StringFormat(std::forward(sql), std::forward(args)...).c_str());
}
//! Enqueues a query in prepared format that will set the value of the PreparedQueryResultFuture return object as soon as the query is executed.
diff --git a/src/common/Database/Field.h b/src/common/Database/Field.h
index 0fb400d1f..747011499 100644
--- a/src/common/Database/Field.h
+++ b/src/common/Database/Field.h
@@ -29,7 +29,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_TINY))
{
sLog->outSQLDriver("Warning: GetUInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
@@ -47,7 +47,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_TINY))
{
sLog->outSQLDriver("Warning: GetInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
@@ -72,7 +72,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR))
{
sLog->outSQLDriver("Warning: GetUInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
@@ -90,7 +90,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR))
{
sLog->outSQLDriver("Warning: GetInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
@@ -108,7 +108,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG))
{
sLog->outSQLDriver("Warning: GetUInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
@@ -126,7 +126,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG))
{
sLog->outSQLDriver("Warning: GetInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
@@ -144,7 +144,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT))
{
sLog->outSQLDriver("Warning: GetUInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
@@ -162,7 +162,7 @@ class Field
if (!data.value)
return 0;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT))
{
sLog->outSQLDriver("Warning: GetInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
@@ -180,7 +180,7 @@ class Field
if (!data.value)
return 0.0f;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_FLOAT))
{
sLog->outSQLDriver("Warning: GetFloat() on non-float field. Using type: %s.", FieldTypeToString(data.type));
@@ -198,7 +198,7 @@ class Field
if (!data.value)
return 0.0f;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (!IsType(MYSQL_TYPE_DOUBLE))
{
sLog->outSQLDriver("Warning: GetDouble() on non-double field. Using type: %s.", FieldTypeToString(data.type));
@@ -216,7 +216,7 @@ class Field
if (!data.value)
return NULL;
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
if (IsNumeric())
{
sLog->outSQLDriver("Error: GetCString() on numeric field. Using type: %s.", FieldTypeToString(data.type));
@@ -345,7 +345,7 @@ class Field
}
private:
- #ifdef TRINITY_DEBUG
+ #ifdef ACORE_DEBUG
static char const* FieldTypeToString(enum_field_types type)
{
switch (type)
diff --git a/src/common/Database/QueryResult.h b/src/common/Database/QueryResult.h
index 0f78be1ef..1445ce3db 100644
--- a/src/common/Database/QueryResult.h
+++ b/src/common/Database/QueryResult.h
@@ -48,7 +48,7 @@ class ResultSet
MYSQL_FIELD* _fields;
};
-typedef Trinity::AutoPtr QueryResult;
+typedef acore::AutoPtr QueryResult;
class PreparedResultSet
{
@@ -93,7 +93,7 @@ class PreparedResultSet
};
-typedef Trinity::AutoPtr PreparedQueryResult;
+typedef acore::AutoPtr PreparedQueryResult;
#endif
diff --git a/src/common/Database/Transaction.h b/src/common/Database/Transaction.h
index 8617a682f..4c2d53a90 100644
--- a/src/common/Database/Transaction.h
+++ b/src/common/Database/Transaction.h
@@ -39,7 +39,7 @@ class Transaction
bool _cleanedUp;
};
-typedef Trinity::AutoPtr SQLTransaction;
+typedef acore::AutoPtr SQLTransaction;
/*! Low level class*/
class TransactionTask : public SQLOperation
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp
index c7e78b838..bf7c443f2 100644
--- a/src/common/Debugging/Errors.cpp
+++ b/src/common/Debugging/Errors.cpp
@@ -54,12 +54,12 @@ namespace
}
}
-namespace Trinity
+namespace acore
{
void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message)
{
- std::string formattedMessage = ACORE::StringFormat("\n%s:%i in %s ASSERTION FAILED:\n %s\n", file, line, function, message) + debugInfo + '\n';
+ std::string formattedMessage = acore::StringFormat("\n%s:%i in %s ASSERTION FAILED:\n %s\n", file, line, function, message) + debugInfo + '\n';
fprintf(stderr, "%s", formattedMessage.c_str());
fflush(stderr);
Crash(formattedMessage.c_str());
@@ -70,7 +70,7 @@ void Assert(char const* file, int line, char const* function, std::string const&
va_list args;
va_start(args, format);
- std::string formattedMessage = ACORE::StringFormat("\n%s:%i in %s ASSERTION FAILED:\n %s\n", file, line, function, message) + FormatAssertionMessage(format, args) + '\n' + debugInfo + '\n';
+ std::string formattedMessage = acore::StringFormat("\n%s:%i in %s ASSERTION FAILED:\n %s\n", file, line, function, message) + FormatAssertionMessage(format, args) + '\n' + debugInfo + '\n';
va_end(args);
fprintf(stderr, "%s", formattedMessage.c_str());
@@ -84,7 +84,7 @@ void Fatal(char const* file, int line, char const* function, char const* message
va_list args;
va_start(args, message);
- std::string formattedMessage = ACORE::StringFormat("\n%s:%i in %s FATAL ERROR:\n", file, line, function) + FormatAssertionMessage(message, args) + '\n';
+ std::string formattedMessage = acore::StringFormat("\n%s:%i in %s FATAL ERROR:\n", file, line, function) + FormatAssertionMessage(message, args) + '\n';
va_end(args);
fprintf(stderr, "%s", formattedMessage.c_str());
@@ -96,7 +96,7 @@ void Fatal(char const* file, int line, char const* function, char const* message
void Error(char const* file, int line, char const* function, char const* message)
{
- std::string formattedMessage = ACORE::StringFormat("\n%s:%i in %s ERROR:\n %s\n", file, line, function, message);
+ std::string formattedMessage = acore::StringFormat("\n%s:%i in %s ERROR:\n %s\n", file, line, function, message);
fprintf(stderr, "%s", formattedMessage.c_str());
fflush(stderr);
Crash(formattedMessage.c_str());
@@ -110,7 +110,7 @@ void Warning(char const* file, int line, char const* function, char const* messa
void Abort(char const* file, int line, char const* function)
{
- std::string formattedMessage = ACORE::StringFormat("\n%s:%i in %s ABORTED.\n", file, line, function);
+ std::string formattedMessage = acore::StringFormat("\n%s:%i in %s ABORTED.\n", file, line, function);
fprintf(stderr, "%s", formattedMessage.c_str());
fflush(stderr);
Crash(formattedMessage.c_str());
@@ -119,13 +119,13 @@ void Abort(char const* file, int line, char const* function)
void AbortHandler(int sigval)
{
// nothing useful to log here, no way to pass args
- std::string formattedMessage = ACORE::StringFormat("Caught signal %i\n", sigval);
+ std::string formattedMessage = acore::StringFormat("Caught signal %i\n", sigval);
fprintf(stderr, "%s", formattedMessage.c_str());
fflush(stderr);
Crash(formattedMessage.c_str());
}
-} // namespace Trinity
+} // namespace acore
std::string GetDebugInfo()
{
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h
index 1edfdcb75..f40aa52d6 100644
--- a/src/common/Debugging/Errors.h
+++ b/src/common/Debugging/Errors.h
@@ -10,7 +10,7 @@
#include "Define.h"
#include
-namespace Trinity
+namespace acore
{
DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message) ATTR_NORETURN;
DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message, char const* format, ...) ATTR_NORETURN ATTR_PRINTF(6, 7);
@@ -25,7 +25,7 @@ namespace Trinity
DECLSPEC_NORETURN void AbortHandler(int sigval) ATTR_NORETURN;
-} // namespace Trinity
+} // namespace acore
std::string GetDebugInfo();
@@ -41,12 +41,12 @@ std::string GetDebugInfo();
#define EXCEPTION_ASSERTION_FAILURE 0xC0000420L
#endif
-#define WPAssert(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0) ASSERT_END
-#define WPAssert_NODEBUGINFO(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond, ##__VA_ARGS__); } while(0) ASSERT_END
-#define WPFatal(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END
-#define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
-#define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
-#define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END
+#define WPAssert(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0) ASSERT_END
+#define WPAssert_NODEBUGINFO(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond, ##__VA_ARGS__); } while(0) ASSERT_END
+#define WPFatal(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END
+#define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) acore::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
+#define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) acore::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
+#define WPAbort() ASSERT_BEGIN do { acore::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END
#ifdef PERFORMANCE_PROFILING
#define ASSERT(cond, ...) ((void)0)
diff --git a/src/common/Define.h b/src/common/Define.h
index e7a5266dd..640d8d2fe 100644
--- a/src/common/Define.h
+++ b/src/common/Define.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_DEFINE_H
-#define TRINITY_DEFINE_H
+#ifndef ACORE_DEFINE_H
+#define ACORE_DEFINE_H
#include
#include
@@ -17,19 +17,19 @@
#define OS_WIN
#endif
-#define TRINITY_LITTLEENDIAN 0
-#define TRINITY_BIGENDIAN 1
+#define ACORE_LITTLEENDIAN 0
+#define ACORE_BIGENDIAN 1
-#if !defined(TRINITY_ENDIAN)
+#if !defined(ACORE_ENDIAN)
# if defined (ACE_BIG_ENDIAN)
-# define TRINITY_ENDIAN TRINITY_BIGENDIAN
+# define ACORE_ENDIAN ACORE_BIGENDIAN
# else //ACE_BYTE_ORDER != ACE_BIG_ENDIAN
-# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
+# define ACORE_ENDIAN ACORE_LITTLEENDIAN
# endif //ACE_BYTE_ORDER
-#endif //TRINITY_ENDIAN
+#endif //ACORE_ENDIAN
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
-# define TRINITY_PATH_MAX MAX_PATH
+# define ACORE_PATH_MAX MAX_PATH
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
# endif //DECLSPEC_NORETURN
@@ -37,18 +37,18 @@
# define DECLSPEC_DEPRECATED __declspec(deprecated)
# endif //DECLSPEC_DEPRECATED
#else //AC_PLATFORM != AC_PLATFORM_WINDOWS
-# define TRINITY_PATH_MAX PATH_MAX
+# define ACORE_PATH_MAX PATH_MAX
# define DECLSPEC_NORETURN
# define DECLSPEC_DEPRECATED
#endif //AC_PLATFORM
#if !defined(COREDEBUG)
-# define TRINITY_INLINE inline
+# define ACORE_INLINE inline
#else //COREDEBUG
-# if !defined(TRINITY_DEBUG)
-# define TRINITY_DEBUG
-# endif //TRINITY_DEBUG
-# define TRINITY_INLINE
+# if !defined(ACORE_DEBUG)
+# define ACORE_DEBUG
+# endif //ACORE_DEBUG
+# define ACORE_INLINE
#endif //!COREDEBUG
#if AC_COMPILER == AC_COMPILER_GNU
@@ -80,4 +80,4 @@ typedef std::uint32_t uint32;
typedef std::uint16_t uint16;
typedef std::uint8_t uint8;
-#endif //TRINITY_DEFINE_H
+#endif //ACORE_DEFINE_H
diff --git a/src/common/Dynamic/FactoryHolder.h b/src/common/Dynamic/FactoryHolder.h
index ac8721d1d..6e26733cb 100644
--- a/src/common/Dynamic/FactoryHolder.h
+++ b/src/common/Dynamic/FactoryHolder.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_FACTORY_HOLDER
-#define TRINITY_FACTORY_HOLDER
+#ifndef ACORE_FACTORY_HOLDER
+#define ACORE_FACTORY_HOLDER
#include "Define.h"
#include "Dynamic/TypeList.h"
diff --git a/src/common/Dynamic/ObjectRegistry.h b/src/common/Dynamic/ObjectRegistry.h
index 97179c911..3458fa446 100644
--- a/src/common/Dynamic/ObjectRegistry.h
+++ b/src/common/Dynamic/ObjectRegistry.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_OBJECTREGISTRY_H
-#define TRINITY_OBJECTREGISTRY_H
+#ifndef ACORE_OBJECTREGISTRY_H
+#define ACORE_OBJECTREGISTRY_H
#include "Define.h"
#include
diff --git a/src/common/Dynamic/TypeContainer.h b/src/common/Dynamic/TypeContainer.h
index c3003d4a1..f7ddd28c7 100644
--- a/src/common/Dynamic/TypeContainer.h
+++ b/src/common/Dynamic/TypeContainer.h
@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS
*/
-#ifndef TRINITY_TYPECONTAINER_H
-#define TRINITY_TYPECONTAINER_H
+#ifndef ACORE_TYPECONTAINER_H
+#define ACORE_TYPECONTAINER_H
/*
* Here, you'll find a series of containers that allow you to hold multiple
@@ -86,19 +86,19 @@ template
class TypeMapContainer
{
public:
- template size_t Count() const { return Trinity::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
+ template size_t Count() const { return acore::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
/// inserts a specific object into the container
template bool insert(SPECIFIC_TYPE *obj)
{
- SPECIFIC_TYPE* t = Trinity::Insert(i_elements, obj);
+ SPECIFIC_TYPE* t = acore::Insert(i_elements, obj);
return (t != NULL);
}
/// Removes the object from the container, and returns the removed object
//template bool remove(SPECIFIC_TYPE* obj)
//{
- // SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj);
+ // SPECIFIC_TYPE* t = acore::Remove(i_elements, obj);
// return (t != NULL);
//}
diff --git a/src/common/Dynamic/TypeContainerFunctions.h b/src/common/Dynamic/TypeContainerFunctions.h
index b4302d9af..d1a63c84b 100644
--- a/src/common/Dynamic/TypeContainerFunctions.h
+++ b/src/common/Dynamic/TypeContainerFunctions.h
@@ -17,7 +17,7 @@
#include "Dynamic/TypeList.h"
#include