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;
}
void hsStringToWString( wchar_t *dst, const char *src )
{
if (dst)
delete [] dst;
dst = hsStringToWString(src);
}
//// IWStringToString /////////////////////////////////////////////////////////
// Converts a wchar_t * string to a char * string
@ -390,13 +383,6 @@ char *hsWStringToString( const wchar_t *str )
return sStr;
}
void hsWStringToString( char *dst, const wchar_t *src )
{
if (dst)
delete [] dst;
dst = hsWStringToString(src);
}
void hsCPathToMacPath(char* dst, char* fname)
{
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 );
void hsStringToWString( wchar_t *dst, const char *src );
char *hsWStringToString( const wchar_t *str );
void hsWStringToString( char *dst, const wchar_t *src);
enum { // Kind of MessageBox...passed to hsMessageBox
hsMessageBoxAbortRetyIgnore,

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

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

Loading…
Cancel
Save