Skip to content

Commit ca347da

Browse files
committed
fixed:codeql warn check
fixed:build error
1 parent 5d1a0e6 commit ca347da

3 files changed

Lines changed: 9 additions & 39 deletions

File tree

XEngine_Module/XEngine_AIApi/AIApi_Chat/AIApi_Chat.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "pch.h"
22
#include "AIApi_Chat.h"
3-
#include <new>
43
/********************************************************************
54
// Created: 2025/05/29 13:57:18
65
// File Name: D:\XEngine_OPenSource\XEngine_Module\XEngine_AIApi\AIApi_Chat\AIApi_Chat.cpp
@@ -118,7 +117,7 @@ bool CAIApi_Chat::AIApi_Chat_Create(XNETHANDLE* pxhToken, LPCXSTR lpszAPIUrl, LP
118117
{
119118
AIApi_IsErrorOccur = true;
120119
AIApi_dwErrorCode = APIClient_GetLastError();
121-
APIClient_Http_Destroy(pSt_AIClient->xhToken);
120+
APIClient_Http_Close(pSt_AIClient->xhToken);
122121
free(pSt_AIClient->ptszMSGBuffer);
123122
delete pSt_AIClient;
124123
return false;
@@ -127,7 +126,7 @@ bool CAIApi_Chat::AIApi_Chat_Create(XNETHANDLE* pxhToken, LPCXSTR lpszAPIUrl, LP
127126
{
128127
AIApi_IsErrorOccur = true;
129128
AIApi_dwErrorCode = APIClient_GetLastError();
130-
APIClient_Http_Destroy(pSt_AIClient->xhToken);
129+
APIClient_Http_Close(pSt_AIClient->xhToken);
131130
free(pSt_AIClient->ptszMSGBuffer);
132131
delete pSt_AIClient;
133132
return false;

XEngine_Module/XEngine_AIApi/pch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <json/json.h>
1919
#include <thread>
2020
#include <memory>
21+
#include <new>
2122
#include <list>
2223
#include <shared_mutex>
2324
#include <unordered_map>

XEngine_Module/XEngine_Verification/Verification_XAuth/Verification_XAuthKey.cpp

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,30 +1154,10 @@ bool CVerification_XAuthKey::Verification_XAuthKey_ReadKey(LPCXSTR lpszFileKey,
11541154
Verification_dwErrorCode = SystemConfig_GetLastError();
11551155
return false;
11561156
}
1157-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszRegisterTime"), pSt_AuthLocal->st_AuthRegInfo.tszRegisterTime) < 0)
1158-
{
1159-
Verification_IsErrorOccur = true;
1160-
Verification_dwErrorCode = SystemConfig_GetLastError();
1161-
return false;
1162-
}
1163-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszLeftTime"), pSt_AuthLocal->st_AuthRegInfo.tszLeftTime) < 0)
1164-
{
1165-
Verification_IsErrorOccur = true;
1166-
Verification_dwErrorCode = SystemConfig_GetLastError();
1167-
return false;
1168-
}
1169-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszStartTime"), pSt_AuthLocal->st_AuthRegInfo.tszStartTime) < 0)
1170-
{
1171-
Verification_IsErrorOccur = true;
1172-
Verification_dwErrorCode = SystemConfig_GetLastError();
1173-
return false;
1174-
}
1175-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszExpiryTime"), pSt_AuthLocal->st_AuthRegInfo.tszExpiryTime) < 0)
1176-
{
1177-
Verification_IsErrorOccur = true;
1178-
Verification_dwErrorCode = SystemConfig_GetLastError();
1179-
return false;
1180-
}
1157+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszRegisterTime"), pSt_AuthLocal->st_AuthRegInfo.tszRegisterTime);
1158+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszLeftTime"), pSt_AuthLocal->st_AuthRegInfo.tszLeftTime);
1159+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszStartTime"), pSt_AuthLocal->st_AuthRegInfo.tszStartTime);
1160+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthReg"), _X("tszExpiryTime"), pSt_AuthLocal->st_AuthRegInfo.tszExpiryTime);
11811161
//临时序列号
11821162
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthSerial"), _X("tszTimeSerial"), pSt_AuthLocal->st_AuthSerial.st_TimeLimit.tszTimeSerial) <= 0)
11831163
{
@@ -1218,18 +1198,8 @@ bool CVerification_XAuthKey::Verification_XAuthKey_ReadKey(LPCXSTR lpszFileKey,
12181198
Verification_dwErrorCode = SystemConfig_GetLastError();
12191199
return false;
12201200
}
1221-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthUser"), _X("tszCustom"), pSt_AuthLocal->st_AuthUserInfo.tszCustom) < 0)
1222-
{
1223-
Verification_IsErrorOccur = true;
1224-
Verification_dwErrorCode = SystemConfig_GetLastError();
1225-
return false;
1226-
}
1227-
if (SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("TimeList"), _X("TimeNumber"), pSt_AuthLocal->tszTimeList) < 0)
1228-
{
1229-
Verification_IsErrorOccur = true;
1230-
Verification_dwErrorCode = SystemConfig_GetLastError();
1231-
return false;
1232-
}
1201+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("AuthUser"), _X("tszCustom"), pSt_AuthLocal->st_AuthUserInfo.tszCustom);
1202+
SystemConfig_File_ReadProfileFromFile(lpszFileKey, _X("TimeList"), _X("TimeNumber"), pSt_AuthLocal->tszTimeList);
12331203
return true;
12341204
}
12351205
/********************************************************************

0 commit comments

Comments
 (0)