From 5e8d75169c9769edee80736b7521fea597cc13b3 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sun, 20 Apr 2014 17:11:34 -0700 Subject: [PATCH] Use pointers instead of array syntax. --- Sources/Plasma/CoreLib/HeadSpin.cpp | 18 +++++++++--------- Sources/Plasma/CoreLib/HeadSpin.h | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Sources/Plasma/CoreLib/HeadSpin.cpp b/Sources/Plasma/CoreLib/HeadSpin.cpp index 0e39e915..ab25f06d 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.cpp +++ b/Sources/Plasma/CoreLib/HeadSpin.cpp @@ -80,7 +80,7 @@ hsDebugMessageProc hsSetDebugMessageProc(hsDebugMessageProc newProc) } #ifdef HS_DEBUGGING -void hsDebugMessage (const char message[], long val) +void hsDebugMessage (const char* message, long val) { char s[1024]; @@ -112,7 +112,7 @@ void ErrorEnableGui(bool enabled) s_GuiAsserts = enabled; } -void ErrorAssert(int line, const char file[], const char fmt[], ...) +void ErrorAssert(int line, const char* file, const char* fmt, ...) { #if defined(HS_DEBUGGING) || !defined(PLASMA_EXTERNAL_RELEASE) char msg[1024]; @@ -158,7 +158,7 @@ void DebugBreakIfDebuggerPresent() #endif // _MSC_VER } -void DebugMsg(const char fmt[], ...) +void DebugMsg(const char* fmt, ...) { char msg[1024]; va_list args; @@ -180,7 +180,7 @@ void DebugMsg(const char fmt[], ...) #ifndef PLASMA_EXTERNAL_RELEASE -void hsStatusMessage(const char message[]) +void hsStatusMessage(const char* message) { if (gHSStatusProc) { gHSStatusProc(message); @@ -243,7 +243,7 @@ public: bool hsMessageBox_SuppressPrompts = false; -int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon) +int hsMessageBoxWithOwner(hsWindowHndl owner, const char* message, const char* caption, int kind, int icon) { if (hsMessageBox_SuppressPrompts) return hsMBoxOk; @@ -296,7 +296,7 @@ int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char c return hsMBoxCancel; } -int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon) +int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t* message, const wchar_t* caption, int kind, int icon) { if (hsMessageBox_SuppressPrompts) return hsMBoxOk; @@ -349,18 +349,18 @@ int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wch return hsMBoxCancel; } -int hsMessageBox(const char message[], const char caption[], int kind, int icon) +int hsMessageBox(const char* message, const char* caption, int kind, int icon) { return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); } -int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon) +int hsMessageBox(const wchar_t* message, const wchar_t* caption, int kind, int icon) { return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); } /**************************************/ -char* hsStrcpy(char dst[], const char src[]) +char* hsStrcpy(char* dst, const char* src) { if (src) { diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index d301a75f..5fd53a70 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -332,14 +332,14 @@ void SWAP (T & a, T & b) { # define hsStatusMessage(x) NULL_STMT # define hsStatusMessageF(x, ...) NULL_STMT #else - void hsStatusMessage(const char message[]); + void hsStatusMessage(const char* message); void hsStatusMessageF(const char * fmt, ...); #endif // PLASMA_EXTERNAL_RELEASE -char* hsStrcpy(char dstOrNil[], const char src[]); +char* hsStrcpy(char* dstOrNil, const char* src); void hsStrLower(char *s); -inline char* hsStrcpy(const char src[]) +inline char* hsStrcpy(const char* src) { return hsStrcpy(nil, src); } @@ -381,10 +381,10 @@ enum { // RETURN VALUES FROM hsMessageBox }; extern bool hsMessageBox_SuppressPrompts; -int hsMessageBox(const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBox(const char* message, const char* caption, int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBox(const wchar_t* message, const wchar_t* caption, int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBoxWithOwner(hsWindowHndl owner, const char* message, const char* caption, int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t* message, const wchar_t* caption, int kind, int icon=hsMessageBoxIconAsterisk); // flag testing / clearing #define hsCheckBits(f,c) ((f & c)==c) @@ -449,15 +449,15 @@ extern hsDebugMessageProc gHSStatusProc; hsDebugMessageProc hsSetStatusMessageProc(hsDebugMessageProc newProc); void ErrorEnableGui (bool enabled); -void ErrorAssert (int line, const char file[], const char fmt[], ...); +void ErrorAssert (int line, const char* file, const char* fmt, ...); bool DebugIsDebuggerPresent (); void DebugBreakIfDebuggerPresent (); -void DebugMsg(const char fmt[], ...); +void DebugMsg(const char* fmt, ...); #ifdef HS_DEBUGGING - void hsDebugMessage(const char message[], long refcon); + void hsDebugMessage(const char* message, long refcon); #define hsDebugCode(code) code #define hsIfDebugMessage(expr, msg, ref) (void)( ((expr) != 0) || (hsDebugMessage(msg, ref), 0) ) #define hsAssert(expr, msg) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, msg), 0) )