Skip to content

Commit 3dd5309

Browse files
committed
modify:change ansi to unicode character set on vs
1 parent c7ed990 commit 3dd5309

File tree

12 files changed

+28
-43
lines changed

12 files changed

+28
-43
lines changed

XEngine_Source/MQCore_ConfigModule/Config_Define.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ typedef struct
7070
}st_XReport;
7171
struct
7272
{
73-
list<tstring> *pStl_ListStorage;
73+
list<xstring> *pStl_ListStorage;
7474
}st_XVer;
7575
}XENGINE_SERVERCONFIG;
7676
typedef struct

XEngine_Source/MQCore_ConfigModule/Config_Json/Config_Json.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool CConfig_Json::Config_Json_VersionFile(LPCXSTR lpszConfigFile, XENGINE_SERVE
196196
return false;
197197
}
198198
Json::Value st_JsonXVer = st_JsonRoot["XVer"];
199-
pSt_ServerConfig->st_XVer.pStl_ListStorage = new list<tstring>;
199+
pSt_ServerConfig->st_XVer.pStl_ListStorage = new list<xstring>;
200200

201201
for (unsigned int i = 0; i < st_JsonXVer.size(); i++)
202202
{

XEngine_Source/MQCore_ConfigModule/MQCore_ConfigModule.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
<ConfigurationType>DynamicLibrary</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
3232
<PlatformToolset>v143</PlatformToolset>
33-
<CharacterSet>MultiByte</CharacterSet>
33+
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>DynamicLibrary</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
3838
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>MultiByte</CharacterSet>
40+
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>DynamicLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
4545
<PlatformToolset>v143</PlatformToolset>
46-
<CharacterSet>MultiByte</CharacterSet>
46+
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
5151
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
53-
<CharacterSet>MultiByte</CharacterSet>
53+
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
5555
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5656
<ImportGroup Label="ExtensionSettings">

XEngine_Source/MQCore_ConfigModule/pch.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
using namespace std;
2525
#include <XEngine_Include/XEngine_CommHdr.h>
2626
#include <XEngine_Include/XEngine_Types.h>
27-
#ifdef _UNICODE
28-
typedef std::wstring tstring;
29-
#else
30-
typedef std::string tstring;
31-
#endif
3227
#include "Config_Define.h"
3328
#include "Config_Error.h"
3429
/********************************************************************

XEngine_Source/MQCore_DBModule/MQCore_DBModule.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
<ConfigurationType>DynamicLibrary</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
3232
<PlatformToolset>v143</PlatformToolset>
33-
<CharacterSet>MultiByte</CharacterSet>
33+
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>DynamicLibrary</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
3838
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>MultiByte</CharacterSet>
40+
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>DynamicLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
4545
<PlatformToolset>v143</PlatformToolset>
46-
<CharacterSet>MultiByte</CharacterSet>
46+
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
5151
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
53-
<CharacterSet>MultiByte</CharacterSet>
53+
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
5555
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5656
<ImportGroup Label="ExtensionSettings">

XEngine_Source/MQCore_ProtocolModule/MQCore_ProtocolModule.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
<ConfigurationType>DynamicLibrary</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
3232
<PlatformToolset>v143</PlatformToolset>
33-
<CharacterSet>MultiByte</CharacterSet>
33+
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>DynamicLibrary</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
3838
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>MultiByte</CharacterSet>
40+
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>DynamicLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
4545
<PlatformToolset>v143</PlatformToolset>
46-
<CharacterSet>MultiByte</CharacterSet>
46+
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
5151
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
53-
<CharacterSet>MultiByte</CharacterSet>
53+
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
5555
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5656
<ImportGroup Label="ExtensionSettings">

XEngine_Source/MQCore_SessionModule/MQCore_SessionModule.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
<ConfigurationType>DynamicLibrary</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
3232
<PlatformToolset>v143</PlatformToolset>
33-
<CharacterSet>MultiByte</CharacterSet>
33+
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>DynamicLibrary</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
3838
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>MultiByte</CharacterSet>
40+
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>DynamicLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
4545
<PlatformToolset>v143</PlatformToolset>
46-
<CharacterSet>MultiByte</CharacterSet>
46+
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
5151
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
53-
<CharacterSet>MultiByte</CharacterSet>
53+
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
5555
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5656
<ImportGroup Label="ExtensionSettings">

XEngine_Source/MQCore_SessionModule/SessionModule_Client/SessionModule_Client.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool CSessionModule_Client::SessionModule_Client_Delete(LPCXSTR lpszClientAddr)
115115
Session_IsErrorOccur = false;
116116

117117
st_Locker.lock();
118-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszClientAddr);
118+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszClientAddr);
119119
if (stl_MapIterator != stl_MapSession.end())
120120
{
121121
stl_MapSession.erase(stl_MapIterator);
@@ -183,7 +183,7 @@ bool CSessionModule_Client::SessionModule_Client_GetUser(LPCXSTR lpszSessionStr,
183183
return false;
184184
}
185185
st_Locker.lock_shared();
186-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszSessionStr);
186+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszSessionStr);
187187
if (stl_MapIterator == stl_MapSession.end())
188188
{
189189
Session_IsErrorOccur = true;
@@ -328,7 +328,7 @@ bool CSessionModule_Client::SessionModule_Client_GetType(LPCXSTR lpszSessionStr,
328328
return false;
329329
}
330330
st_Locker.lock_shared();
331-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszSessionStr);
331+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszSessionStr);
332332
if (stl_MapIterator == stl_MapSession.end())
333333
{
334334
Session_IsErrorOccur = true;
@@ -373,7 +373,7 @@ bool CSessionModule_Client::SessionModule_Client_GetExist(LPCXSTR lpszClientAddr
373373
if (NULL == lpszClientAddr)
374374
{
375375
bool bFound = false;
376-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.begin();
376+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.begin();
377377
for (int i = 0; stl_MapIterator != stl_MapSession.end(); stl_MapIterator++, i++)
378378
{
379379
if (0 == _tcsxnicmp(lpszClientUser, stl_MapIterator->second.st_UserInfo.tszUserName, _tcsxlen(stl_MapIterator->second.st_UserInfo.tszUserName)))
@@ -392,7 +392,7 @@ bool CSessionModule_Client::SessionModule_Client_GetExist(LPCXSTR lpszClientAddr
392392
}
393393
else
394394
{
395-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszClientAddr);
395+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.find(lpszClientAddr);
396396
if (stl_MapIterator == stl_MapSession.end())
397397
{
398398
Session_IsErrorOccur = true;
@@ -435,7 +435,7 @@ bool CSessionModule_Client::SessionModule_Client_GetListAddr(XCHAR*** ppptszClie
435435
BaseLib_Memory_Malloc((XPPPMEM)ppptszClientList, stl_MapSession.size(), 128);
436436

437437
st_Locker.lock_shared();
438-
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.begin();
438+
unordered_map<xstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.begin();
439439
for (int i = 0; stl_MapIterator != stl_MapSession.end(); stl_MapIterator++, i++)
440440
{
441441
if (bAddr)

XEngine_Source/MQCore_SessionModule/SessionModule_Client/SessionModule_Client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ class CSessionModule_Client
3838
private:
3939
shared_mutex st_Locker;
4040
private:
41-
unordered_map<tstring, XENGINE_SESSIONINFO> stl_MapSession;
41+
unordered_map<xstring, XENGINE_SESSIONINFO> stl_MapSession;
4242
};

XEngine_Source/MQCore_SessionModule/pch.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
#include "Session_Define.h"
3030
#include "Session_Error.h"
3131
using namespace std;
32-
#ifdef _UNICODE
33-
typedef std::wstring tstring;
34-
#else
35-
typedef std::string tstring;
36-
#endif
3732
/********************************************************************
3833
// Created: 2021/07/02 10:16:47
3934
// File Name: D:\XEngine_MQService\XEngine_Source\MQCore_SessionModule\pch.h

0 commit comments

Comments
 (0)