#define __StrDup Q_StrDup
-inline char* Q_StrDup(char* pStr)
-{
- if (pStr == NULL)
- pStr = "";
+inline char* Q_StrDup( char* _pStr ) {
+ const char* pStr = _pStr;
+ if ( pStr == NULL ) {
+ pStr = "";
+ }
- return strcpy(new char[strlen(pStr)+1], pStr);
+ return strcpy( new char[ strlen( pStr ) + 1 ], pStr );
}
-inline char* Q_StrDup(const char* pStr)
-{
- if (pStr == NULL)
- pStr = "";
+inline char* Q_StrDup( const char* pStr ) {
+ if ( pStr == NULL ) {
+ pStr = "";
+ }
- return strcpy(new char[strlen(pStr)+1], pStr);
+ return strcpy( new char[strlen(pStr)+1], pStr );
}
#if defined (__linux__) || defined (__APPLE__)
}
else
{
- g_pStrWork = "";
g_pStrWork = new char[1];
g_pStrWork[0] = '\0';
}
}
else
{
- g_pStrWork = "";
g_pStrWork = new char[1];
g_pStrWork[0] = '\0';
}