Skip to content

Commit ea154b5

Browse files
Synchronize changes from 1.6 master branch [ci skip]
dede110 Remove NetBitStreamInterfaceNoVersion f855b36 Limit some disablewarnings to system:windows 39a9ff5 Move destructor of dwarf2reader::CompilationUnit to cc file 2b80fbf Remove env step for macOS build 2ecdac7 Change linux-build defaults for macOS 328ea8f Remove x64 for macOS 3300770 Fix Linux compile error and some warnings 539bd29 Switch to macOS-15 runner image 6fabe57 Fix Linux compiler error 224172f Fix warning in json-c ea834e2 Fix for commit 3d01dbb aa7653e Update Premake from 5.0.0-b5 to Update Premake from 5.0.0-b7 3d01dbb Default to GCC-15 for macOS ba48e34 Switch to C++23 a57ae58 Remove /SAFESEH:NO 52308a3 Resolve errors and warnings in remainder 7b98424 Resolve errors and warnings in Client Deathmatch 73489af Resolve errors and warnings in Client e2e7e98 Resolve errors and warnings in Server 17f7386 Resolve errors and warnings in Shared 4dcf140 Resolve errors and warnings in vendor 1762b18 Add MSVC build option /permissive-
2 parents d4c69a6 + dede110 commit ea154b5

File tree

232 files changed

+1169
-1696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+1169
-1696
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
macOS:
5454
name: macOS
55-
runs-on: macOS-13
55+
runs-on: macOS-15
5656
steps:
5757
- uses: actions/checkout@v4
5858

@@ -64,7 +64,7 @@ jobs:
6464
run: brew link --overwrite mysql
6565

6666
- name: Run Build
67-
run: ./linux-build.sh --os=macosx
67+
run: ./linux-build.sh
6868

6969
linux:
7070
strategy:

Client/cefweb/CWebCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void CWebCore::ProcessInputMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
502502
if ((keyEvent.type == KEYEVENT_CHAR) && isKeyDown(VK_RMENU))
503503
{
504504
HKL current_layout = ::GetKeyboardLayout(0);
505-
SHORT scan_res = ::VkKeyScanExW(wParam, current_layout);
505+
SHORT scan_res = ::VkKeyScanExW(static_cast<WCHAR>(wParam), current_layout);
506506
if ((HIBYTE(scan_res) & (2 | 4)) == (2 | 4))
507507
{
508508
keyEvent.modifiers &= ~(EVENTFLAG_CONTROL_DOWN | EVENTFLAG_ALT_DOWN);

Client/cefweb/premake5.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ project "Client Webbrowser"
66

77
filter "system:windows"
88
includedirs { "../../vendor/sparsehash/src/windows" }
9-
linkoptions { "/SAFESEH:NO" }
109
buildoptions { "-Zm130" }
1110

1211
filter {}

Client/core/CAdditionalVertexStreamManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ SAdditionalStreamInfo* CAdditionalVertexStreamManager::CreateAdditionalStreamInf
466466
declNew->Usage = D3DDECLUSAGE_NORMAL;
467467
declNew->UsageIndex = 0;
468468
if (FAILED(m_pDevice->CreateVertexDeclaration(elements, &info.pVertexDeclaration)))
469-
return false;
469+
return nullptr;
470470

471471
// Create new stream
472472
info.Stride = sizeof(float) * 3;
473473
UINT Size2 = ConvertPTSize(state.decl.VertexBufferDesc1.Size);
474474
if (FAILED(m_pDevice->CreateVertexBuffer(Size2, D3DUSAGE_WRITEONLY, 0, D3DPOOL_MANAGED, &info.pStreamData, NULL)))
475-
return false;
475+
return nullptr;
476476

477477
// Save info
478478
MapSet(m_AdditionalStreamInfoMap, state.stream1.pStreamData, info);

Client/core/CChat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ bool CChat::CharacterKeyHandler(CGUIKeyEventArgs KeyboardArgs)
737737
{
738738
// Check size if it's ok, then output
739739
SString strOutput = strCurrentInput.replace(iFound, std::string::npos, strPlayerName);
740-
if (MbUTF8ToUTF16(strOutput).size() < m_iCharacterLimit)
740+
if (MbUTF8ToUTF16(strOutput).size() < static_cast<size_t>(m_iCharacterLimit))
741741
{
742742
bSuccess = true;
743743
m_strLastPlayerNamePart = strPlayerNamePart;
@@ -802,7 +802,7 @@ bool CChat::CharacterKeyHandler(CGUIKeyEventArgs KeyboardArgs)
802802
}
803803

804804
// If we haven't exceeded the maximum number of characters per chat message, append the char to the message and update the input control
805-
if (MbUTF8ToUTF16(m_strInputText).size() < m_iCharacterLimit)
805+
if (MbUTF8ToUTF16(m_strInputText).size() < static_cast<size_t>(m_iCharacterLimit))
806806
{
807807
if (KeyboardArgs.codepoint >= 32)
808808
{

Client/core/CClientVariables.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ bool CClientVariables::Get(const std::string& strVariable, CColor& val)
106106
try
107107
{
108108
ss >> iR >> iG >> iB >> iA;
109-
val.R = iR;
110-
val.G = iG;
111-
val.B = iB;
112-
val.A = iA;
109+
val.R = static_cast<unsigned char>(iR);
110+
val.G = static_cast<unsigned char>(iG);
111+
val.B = static_cast<unsigned char>(iB);
112+
val.A = static_cast<unsigned char>(iA);
113113
}
114114
catch (...)
115115
{

Client/core/CCommandFuncs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ void CCommandFuncs::FakeLag(const char* szCmdLine)
480480
if (parts.size() > 3)
481481
iKBPSLimit = atoi(parts[3]);
482482

483-
g_pCore->GetNetwork()->SetFakeLag(iPacketLoss, iExtraPing, iExtraPingVary, iKBPSLimit);
483+
g_pCore->GetNetwork()->SetFakeLag(static_cast<unsigned short>(iPacketLoss), static_cast<unsigned short>(iExtraPing),
484+
static_cast<unsigned short>(iExtraPingVary), iKBPSLimit);
484485
g_pCore->GetConsole()->Print(SString("Client send lag is now: %d%% packet loss and %d extra ping with %d extra ping variance and %d KBPS limit",
485486
iPacketLoss, iExtraPing, iExtraPingVary, iKBPSLimit));
486487
}

Client/core/CCommands.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ bool CCommands::Execute(const char* szCommand, const char* szParametersIn, bool
8585
{
8686
// Copy szParametersIn so the contents can be changed
8787
char* szParameters = NULL;
88+
char empyParameters[1] = { 0 };
8889
if (szParametersIn)
8990
{
9091
size_t sizeParameters = strlen(szParametersIn) + 1;
@@ -115,7 +116,7 @@ bool CCommands::Execute(const char* szCommand, const char* szParametersIn, bool
115116
}
116117
if (szParameters == NULL)
117118
{
118-
szParameters = "";
119+
szParameters = empyParameters;
119120
}
120121
}
121122
}

Client/core/CConnectManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool CConnectManager::Reconnect(const char* szHost, unsigned short usPort, const
165165
unsigned int uiPort = 0;
166166
CVARS_GET("host", m_strHost);
167167
CVARS_GET("port", uiPort);
168-
m_usPort = uiPort;
168+
m_usPort = static_cast<unsigned short>(uiPort);
169169

170170
// If keeping the same host & port, retrieve the password as well
171171
if (!szHost || !szHost[0] || m_strHost == szHost)

Client/core/CCore.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ static HMODULE WINAPI SkipDirectPlay_LoadLibraryA(LPCSTR fileName)
6161
const fs::path inLaunchDir = fs::path{FromUTF8(GetLaunchPath())} / "enbseries" / "enbhelper.dll";
6262

6363
if (fs::is_regular_file(inLaunchDir, ec))
64-
return Win32LoadLibraryA(inLaunchDir.u8string().c_str());
64+
return Win32LoadLibraryA(UTF8FilePath(inLaunchDir).c_str());
6565

6666
// Try to load enbhelper.dll from the GTA install directory second.
6767
const fs::path inGTADir = g_gtaDirectory / "enbseries" / "enbhelper.dll";
6868

6969
if (fs::is_regular_file(inGTADir, ec))
70-
return Win32LoadLibraryA(inGTADir.u8string().c_str());
70+
return Win32LoadLibraryA(UTF8FilePath(inGTADir).c_str());
7171

7272
return nullptr;
7373
}
@@ -1757,8 +1757,8 @@ void CCore::UpdateRecentlyPlayed()
17571757
{
17581758
CServerBrowser* pServerBrowser = CCore::GetSingleton().GetLocalGUI()->GetMainMenu()->GetServerBrowser();
17591759
CServerList* pRecentList = pServerBrowser->GetRecentList();
1760-
pRecentList->Remove(Address, uiPort);
1761-
pRecentList->AddUnique(Address, uiPort, true);
1760+
pRecentList->Remove(Address, static_cast<ushort>(uiPort));
1761+
pRecentList->AddUnique(Address, static_cast<ushort>(uiPort), true);
17621762

17631763
pServerBrowser->SaveRecentlyPlayedList();
17641764
if (!m_pConnectManager->m_strLastPassword.empty())

0 commit comments

Comments
 (0)