Skip to content

Commit b42518e

Browse files
committed
Apply win-apply-clang-format.bat
1 parent 1236682 commit b42518e

File tree

263 files changed

+33447
-18734
lines changed

Some content is hidden

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

263 files changed

+33447
-18734
lines changed

Client/ceflauncher_DLL/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <string>
1515
#include <cef3/cef/include/cef_sandbox_win.h>
1616

17-
//#define CEF_ENABLE_SANDBOX
17+
// #define CEF_ENABLE_SANDBOX
1818
#ifdef CEF_ENABLE_SANDBOX
1919
#pragma comment(lib, "cef_sandbox.lib")
2020
#endif

Client/cefweb/CWebCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "WebBrowserHelpers.h"
1919
#include "CWebApp.h"
2020

21-
//#define CEF_ENABLE_SANDBOX
21+
// #define CEF_ENABLE_SANDBOX
2222
#ifdef CEF_ENABLE_SANDBOX
2323
#pragma comment(lib, "cef_sandbox.lib")
2424
#endif

Client/cefweb/CWebView.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CWebView::~CWebView()
4545
ResumeCefThread();
4646

4747
// Ensure that CefRefPtr::~CefRefPtr doesn't try to release it twice (it has already been released in CWebView::OnBeforeClose)
48-
m_pWebView = nullptr;
48+
m_pWebView = nullptr;
4949

5050
OutputDebugLine("CWebView::~CWebView");
5151
}
@@ -187,7 +187,7 @@ void CWebView::ClearTexture()
187187
IDirect3DSurface9* pD3DSurface = m_pWebBrowserRenderItem->m_pD3DRenderTargetSurface;
188188
if (!pD3DSurface)
189189
return;
190-
190+
191191
D3DSURFACE_DESC SurfaceDesc;
192192
if (FAILED(pD3DSurface->GetDesc(&SurfaceDesc)))
193193
return;
@@ -236,12 +236,12 @@ void CWebView::UpdateTexture()
236236
{
237237
// Note that D3D texture size can be hardware dependent(especially with dynamic texture)
238238
// When destination and source pitches differ we must copy pixels row by row
239-
if (destPitch == sourcePitch)
239+
if (destPitch == sourcePitch)
240240
memcpy(destData, sourceData, destPitch * m_RenderData.height);
241241
else
242242
{
243243
for (int y = 0; y < m_RenderData.height; ++y)
244-
{
244+
{
245245
const int sourceIndex = y * sourcePitch;
246246
const int destIndex = y * destPitch;
247247

@@ -470,7 +470,8 @@ bool CWebView::GetFullPathFromLocal(SString& strPath)
470470
bool result = false;
471471

472472
g_pCore->GetWebCore()->WaitForTask(
473-
[&](bool aborted) {
473+
[&](bool aborted)
474+
{
474475
if (aborted)
475476
return;
476477

@@ -517,7 +518,8 @@ bool CWebView::VerifyFile(const SString& strPath, CBuffer& outFileData)
517518
bool result = false;
518519

519520
g_pCore->GetWebCore()->WaitForTask(
520-
[&](bool aborted) {
521+
[&](bool aborted)
522+
{
521523
if (aborted)
522524
return;
523525

@@ -702,7 +704,7 @@ void CWebView::OnPaint(CefRefPtr<CefBrowser> browser, CefRenderHandler::PaintEle
702704
return;
703705

704706
std::unique_lock<std::mutex> lock(m_RenderData.dataMutex);
705-
707+
706708
// Copy popup buffer
707709
if (paintType == PET_POPUP)
708710
{
@@ -722,8 +724,8 @@ void CWebView::OnPaint(CefRefPtr<CefBrowser> browser, CefRenderHandler::PaintEle
722724
m_RenderData.changed = true;
723725

724726
// Wait for the main thread to handle drawing the texture
725-
m_RenderData.cefThreadState = ECefThreadState::Wait;
726-
m_RenderData.cefThreadCv.wait(lock, [&](){ return m_RenderData.cefThreadState == ECefThreadState::Running; });
727+
m_RenderData.cefThreadState = ECefThreadState::Wait;
728+
m_RenderData.cefThreadCv.wait(lock, [&]() { return m_RenderData.cefThreadState == ECefThreadState::Running; });
727729
}
728730

729731
////////////////////////////////////////////////////////////////////
@@ -810,7 +812,7 @@ bool CWebView::OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>
810812
if (host != "mta")
811813
{
812814
if (IsLocal() || g_pCore->GetWebCore()->GetDomainState(host, true) != eURLState::WEBPAGE_ALLOWED)
813-
bResult = true; // Block remote here
815+
bResult = true; // Block remote here
814816
else
815817
bResult = false; // Allow
816818
}
@@ -820,7 +822,7 @@ bool CWebView::OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>
820822
else if (scheme == L"mtalocal")
821823
bResult = false; // Allow mtalocal:// URLs
822824
else
823-
bResult = true; // Block other schemes
825+
bResult = true; // Block other schemes
824826

825827
// Check if we're in the browser's main frame or only a frame element of the current page
826828
bool bIsMainFrame = frame->IsMain();
@@ -1044,9 +1046,8 @@ bool CWebView::OnConsoleMessage(CefRefPtr<CefBrowser> browser, cef_log_severity_
10441046
if (g_pCore->GetWebCore()->IsTestModeEnabled())
10451047
{
10461048
g_pCore->GetWebCore()->AddEventToEventQueue(
1047-
[message, source]() {
1048-
g_pCore->DebugPrintfColor("[BROWSER] Console: %s (%s)", 255, 0, 0, UTF16ToMbUTF8(message).c_str(), UTF16ToMbUTF8(source).c_str());
1049-
},
1049+
[message, source]()
1050+
{ g_pCore->DebugPrintfColor("[BROWSER] Console: %s (%s)", 255, 0, 0, UTF16ToMbUTF8(message).c_str(), UTF16ToMbUTF8(source).c_str()); },
10501051
this, "OnConsoleMessage");
10511052
}
10521053

Client/cefweb/CWebView.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
enum class ECefThreadState
3434
{
35-
Running = 0, // CEF thread is currently running
36-
Wait // CEF thread is waiting for the main thread
35+
Running = 0, // CEF thread is currently running
36+
Wait // CEF thread is waiting for the main thread
3737
};
3838

3939
class CWebView : public CWebViewInterface,

Client/core/CAdditionalVertexStreamManager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ namespace
1919
// Helper functions for this file only
2020

2121
// Convert size of PT stream to sizeof of N stream
22-
uint ConvertPTSize(uint SizePT) { return SizePT * 12 / 20; }
22+
uint ConvertPTSize(uint SizePT)
23+
{
24+
return SizePT * 12 / 20;
25+
}
2326

2427
// Get 64 bit key for a triangle by using the ordered vertex indices
2528
long long getTriKey(WORD a, WORD b, WORD c)

Client/core/CClientVariables.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,27 +270,27 @@ void CClientVariables::LoadDefaults()
270270
CCore::GetSingleton().RequestNewNickOnStart(); // Request the user to set a new nickname
271271
}
272272

273-
DEFAULT("host", _S("127.0.0.1")); // hostname
274-
DEFAULT("port", 22003); // port
275-
DEFAULT("password", _S("")); // password
276-
DEFAULT("qc_host", _S("127.0.0.1")); // quick connect hostname
277-
DEFAULT("qc_port", 22003); // quick connect port
278-
DEFAULT("qc_password", _S("")); // quick connect password
279-
DEFAULT("debugfile", _S("")); // debug filename
280-
DEFAULT("console_pos", CVector2D(0, 0)); // console position
281-
DEFAULT("console_size", CVector2D(200, 200)); // console size
282-
DEFAULT("serverbrowser_size", CVector2D(720.0f, 495.0f)); // serverbrowser size
283-
DEFAULT("fps_limit", 100); // frame limiter
284-
DEFAULT("chat_font", 2); // chatbox font type
285-
DEFAULT("chat_lines", 10); // chatbox lines
286-
DEFAULT("chat_color", CColor(0, 0, 0, 0)); // chatbox background color
287-
DEFAULT("chat_text_color", CColor(172, 213, 254, 255)); // chatbox text color
273+
DEFAULT("host", _S("127.0.0.1")); // hostname
274+
DEFAULT("port", 22003); // port
275+
DEFAULT("password", _S("")); // password
276+
DEFAULT("qc_host", _S("127.0.0.1")); // quick connect hostname
277+
DEFAULT("qc_port", 22003); // quick connect port
278+
DEFAULT("qc_password", _S("")); // quick connect password
279+
DEFAULT("debugfile", _S("")); // debug filename
280+
DEFAULT("console_pos", CVector2D(0, 0)); // console position
281+
DEFAULT("console_size", CVector2D(200, 200)); // console size
282+
DEFAULT("serverbrowser_size", CVector2D(720.0f, 495.0f)); // serverbrowser size
283+
DEFAULT("fps_limit", 100); // frame limiter
284+
DEFAULT("chat_font", 2); // chatbox font type
285+
DEFAULT("chat_lines", 10); // chatbox lines
286+
DEFAULT("chat_color", CColor(0, 0, 0, 0)); // chatbox background color
287+
DEFAULT("chat_text_color", CColor(172, 213, 254, 255)); // chatbox text color
288288
DEFAULT("chat_text_outline", false);
289-
DEFAULT("chat_input_color", CColor(0, 0, 0, 0)); // chatbox input background color
290-
DEFAULT("chat_input_prefix_color", CColor(172, 213, 254, 255)); // chatbox input prefix color
291-
DEFAULT("chat_input_text_color", CColor(172, 213, 254, 255)); // chatbox input text color
292-
DEFAULT("chat_scale", CVector2D(1.0f, 1.0f)); // chatbox scale
293-
DEFAULT("chat_width", 1.5f); // chatbox width
289+
DEFAULT("chat_input_color", CColor(0, 0, 0, 0)); // chatbox input background color
290+
DEFAULT("chat_input_prefix_color", CColor(172, 213, 254, 255)); // chatbox input prefix color
291+
DEFAULT("chat_input_text_color", CColor(172, 213, 254, 255)); // chatbox input text color
292+
DEFAULT("chat_scale", CVector2D(1.0f, 1.0f)); // chatbox scale
293+
DEFAULT("chat_width", 1.5f); // chatbox width
294294

295295
DEFAULT("chat_css_style_text", false); // chatbox css/hl style text
296296
DEFAULT("chat_css_style_background", false); // chatbox css/hl style background

Client/core/CCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ void CCore::ParseCommandLine(std::map<std::string, std::string>& options, const
14831483
szCmdLine = afterPath;
14841484
}
14851485
}
1486-
1486+
14871487
char szCmdLineCopy[512];
14881488
STRNCPY(szCmdLineCopy, szCmdLine, sizeof(szCmdLineCopy));
14891489

Client/core/CCore.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,25 @@ class CCore : public CCoreInterface, public CSingleton<CCore>
8282
~CCore();
8383

8484
// Subsystems (query)
85-
eCoreVersion GetVersion();
86-
CConsoleInterface* GetConsole();
87-
CCommandsInterface* GetCommands();
88-
CConnectManager* GetConnectManager() { return m_pConnectManager; };
89-
CGame* GetGame();
90-
CGUI* GetGUI();
91-
CGraphicsInterface* GetGraphics();
92-
CModManagerInterface* GetModManager();
93-
CMultiplayer* GetMultiplayer();
94-
CNet* GetNetwork();
95-
CXML* GetXML() { return m_pXML; };
96-
CXMLNode* GetConfig();
97-
CClientVariables* GetCVars() { return &m_ClientVariables; };
98-
CKeyBindsInterface* GetKeyBinds();
99-
CMouseControl* GetMouseControl() { return m_pMouseControl; };
100-
CLocalGUI* GetLocalGUI();
101-
CLocalizationInterface* GetLocalization() { return g_pLocalization; };
102-
CWebCoreInterface* GetWebCore();
103-
CTrayIconInterface* GetTrayIcon() { return m_pTrayIcon; };
85+
eCoreVersion GetVersion();
86+
CConsoleInterface* GetConsole();
87+
CCommandsInterface* GetCommands();
88+
CConnectManager* GetConnectManager() { return m_pConnectManager; };
89+
CGame* GetGame();
90+
CGUI* GetGUI();
91+
CGraphicsInterface* GetGraphics();
92+
CModManagerInterface* GetModManager();
93+
CMultiplayer* GetMultiplayer();
94+
CNet* GetNetwork();
95+
CXML* GetXML() { return m_pXML; };
96+
CXMLNode* GetConfig();
97+
CClientVariables* GetCVars() { return &m_ClientVariables; };
98+
CKeyBindsInterface* GetKeyBinds();
99+
CMouseControl* GetMouseControl() { return m_pMouseControl; };
100+
CLocalGUI* GetLocalGUI();
101+
CLocalizationInterface* GetLocalization() { return g_pLocalization; };
102+
CWebCoreInterface* GetWebCore();
103+
CTrayIconInterface* GetTrayIcon() { return m_pTrayIcon; };
104104

105105
void SaveConfig(bool bWaitUntilFinished = false);
106106

Client/core/CEntryHistory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CEntryHistoryItem
4040

4141
bool operator!=(const SString& other) const { return entry != other; }
4242
bool operator==(const SString& other) const { return entry == other; }
43-
operator const char*() const { return entry.c_str(); }
43+
operator const char*() const { return entry.c_str(); }
4444
};
4545

4646
class CEntryHistory

Client/core/CFileFormatJpeg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool JpegEncode(uint uiWidth, uint uiHeight, uint uiQuality, const void* pData,
140140
unsigned char* membuffer = NULL;
141141
jpeg_mem_dest(&cinfo, &membuffer, &memlen);
142142

143-
cinfo.image_width = uiWidth; /* image width and height, in pixels */
143+
cinfo.image_width = uiWidth; /* image width and height, in pixels */
144144
cinfo.image_height = uiHeight;
145145
cinfo.input_components = 3; /* # of color components per pixel */
146146
cinfo.in_color_space = JCS_RGB; /* colorspace of input image */

0 commit comments

Comments
 (0)