mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Misc: Remove trailing whitespace, compile warnings and minor cosmetic changes
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace Trinity {
|
||||
|
||||
void Assert(char const *file, int line, char const *function, char const *message)
|
||||
void Assert(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
ACE_Stack_Trace st;
|
||||
fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n",
|
||||
@@ -33,7 +33,7 @@ void Assert(char const *file, int line, char const *function, char const *messag
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Fatal(char const *file, int line, char const *function, char const *message)
|
||||
void Fatal(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n %s\n",
|
||||
file, line, function, message);
|
||||
@@ -42,7 +42,7 @@ void Fatal(char const *file, int line, char const *function, char const *message
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Error(char const *file, int line, char const *function, char const *message)
|
||||
void Error(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n",
|
||||
file, line, function, message);
|
||||
@@ -50,7 +50,7 @@ void Error(char const *file, int line, char const *function, char const *message
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Warning(char const *file, int line, char const *function, char const *message)
|
||||
void Warning(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s WARNING:\n %s\n",
|
||||
file, line, function, message);
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
namespace Trinity
|
||||
{
|
||||
|
||||
DECLSPEC_NORETURN void Assert(char const *file, int line, char const *function, char const *message) ATTR_NORETURN;
|
||||
DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
DECLSPEC_NORETURN void Fatal(char const *file, int line, char const *function, char const *message) ATTR_NORETURN;
|
||||
DECLSPEC_NORETURN void Fatal(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
DECLSPEC_NORETURN void Error(char const *file, int line, char const *function, char const *message) ATTR_NORETURN;
|
||||
DECLSPEC_NORETURN void Error(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
void Warning(char const *file, int line, char const *function, char const *message);
|
||||
void Warning(char const* file, int line, char const* function, char const* message);
|
||||
|
||||
} // namespace Trinity
|
||||
|
||||
#define WPAssert(cond) do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond); } while(0)
|
||||
#define WPFatal(cond, msg) do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPError(cond, msg) do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPWarning(cond, msg) do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPAssert(cond) do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond); } while (0)
|
||||
#define WPFatal(cond, msg) do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
#define WPError(cond, msg) do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
#define WPWarning(cond, msg) do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
|
||||
#define ASSERT WPAssert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user