Browse Source

Completely remove broken version of WString conversion

Michael Hansen 14 years ago
parent
commit
d4ffe82237
  1. 14
      Sources/Plasma/CoreLib/hsUtils.cpp
  2. 2
      Sources/Plasma/CoreLib/hsUtils.h
  3. 18
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp

14
Sources/Plasma/CoreLib/hsUtils.cpp

@ -357,13 +357,6 @@ wchar_t *hsStringToWString( const char *str )
return wideString; return wideString;
} }
void hsStringToWString( wchar_t *dst, const char *src )
{
if (dst)
delete [] dst;
dst = hsStringToWString(src);
}
//// IWStringToString ///////////////////////////////////////////////////////// //// IWStringToString /////////////////////////////////////////////////////////
// Converts a wchar_t * string to a char * string // Converts a wchar_t * string to a char * string
@ -390,13 +383,6 @@ char *hsWStringToString( const wchar_t *str )
return sStr; return sStr;
} }
void hsWStringToString( char *dst, const wchar_t *src )
{
if (dst)
delete [] dst;
dst = hsWStringToString(src);
}
void hsCPathToMacPath(char* dst, char* fname) void hsCPathToMacPath(char* dst, char* fname)
{ {
int i; int i;

2
Sources/Plasma/CoreLib/hsUtils.h

@ -75,9 +75,7 @@ inline char *hsStrncpy(char *strDest, const char *strSource, size_t count)
} }
wchar_t *hsStringToWString( const char *str ); wchar_t *hsStringToWString( const char *str );
void hsStringToWString( wchar_t *dst, const char *src );
char *hsWStringToString( const wchar_t *str ); char *hsWStringToString( const wchar_t *str );
void hsWStringToString( char *dst, const wchar_t *src);
enum { // Kind of MessageBox...passed to hsMessageBox enum { // Kind of MessageBox...passed to hsMessageBox
hsMessageBoxAbortRetyIgnore, hsMessageBoxAbortRetyIgnore,

18
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp

@ -1073,8 +1073,7 @@ PF_CONSOLE_CMD(
"string url", "string url",
"Set the displayable server URL" "Set the displayable server URL"
) { ) {
wchar_t *wurl = NULL; wchar_t *wurl = hsStringToWString((const char *)params[0]);
hsStringToWString(wurl, (const char *)params[0]);
SetServerUrl(wurl); SetServerUrl(wurl);
delete [] wurl; delete [] wurl;
} }
@ -1086,8 +1085,7 @@ PF_CONSOLE_CMD(
"string name", "string name",
"Set the displayable server name" "Set the displayable server name"
) { ) {
wchar_t *wname = NULL; wchar_t *wname = hsStringToWString((const char *)params[0]);
hsStringToWString(wname, (const char *)params[0]);
SetServerDisplayName(wname); SetServerDisplayName(wname);
delete [] wname; delete [] wname;
} }
@ -1104,8 +1102,7 @@ PF_CONSOLE_CMD(
"string address", "string address",
"Set the File Server address" "Set the File Server address"
) { ) {
wchar_t *wHost = NULL; wchar_t *wHost = hsStringToWString((const char *)params[0]);
hsStringToWString(wHost, (const char *)params[0]);
SetFileSrvHostname(wHost); SetFileSrvHostname(wHost);
delete [] wHost; delete [] wHost;
} }
@ -1122,8 +1119,7 @@ PF_CONSOLE_CMD(
"string address", "string address",
"Set the Auth Server address" "Set the Auth Server address"
) { ) {
wchar_t *wHost = NULL; wchar_t *wHost = hsStringToWString((const char *)params[0]);
hsStringToWString(wHost, (const char *)params[0]);
SetAuthSrvHostname(wHost); SetAuthSrvHostname(wHost);
delete [] wHost; delete [] wHost;
} }
@ -1176,8 +1172,7 @@ PF_CONSOLE_CMD(
"string address", "string address",
"Set the Csr Server address" "Set the Csr Server address"
) { ) {
wchar_t *wHost = NULL; wchar_t *wHost = hsStringToWString((const char *)params[0]);
hsStringToWString(wHost, (const char *)params[0]);
SetCsrSrvHostname(wHost); SetCsrSrvHostname(wHost);
delete [] wHost; delete [] wHost;
} }
@ -1271,8 +1266,7 @@ PF_CONSOLE_CMD(
"string address", "string address",
"Set the GateKeeper Server address" "Set the GateKeeper Server address"
) { ) {
wchar_t *wHost = NULL; wchar_t *wHost = hsStringToWString((const char *)params[0]);
hsStringToWString(wHost, (const char *)params[0]);
SetGateKeeperSrvHostname(wHost); SetGateKeeperSrvHostname(wHost);
delete [] wHost; delete [] wHost;
} }

Loading…
Cancel
Save