Skip to content

Commit 16769b8

Browse files
committed
Revert "Revert "Run clang-format""
This reverts commit 6f09a0a.
1 parent 3369882 commit 16769b8

File tree

312 files changed

+2088
-2338
lines changed

Some content is hidden

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

312 files changed

+2088
-2338
lines changed

Client/cefweb/CWebCore.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ eURLState CWebCore::GetDomainState(const SString& strURL, bool bOutputDebug)
254254
std::lock_guard<std::recursive_mutex> lock(m_FilterMutex);
255255

256256
// Initialize wildcard whitelist (be careful with modifying) | Todo: Think about the following
257-
static SString wildcardWhitelist[] = {"*.googlevideo.com", "*.google.com", "*.youtube.com", "*.ytimg.com", "*.vimeocdn.com", "*.gstatic.com", "*.googleapis.com", "*.ggpht.com"};
257+
static SString wildcardWhitelist[] = {"*.googlevideo.com", "*.google.com", "*.youtube.com", "*.ytimg.com",
258+
"*.vimeocdn.com", "*.gstatic.com", "*.googleapis.com", "*.ggpht.com"};
258259

259260
for (int i = 0; i < sizeof(wildcardWhitelist) / sizeof(SString); ++i)
260261
{
@@ -329,9 +330,9 @@ void CWebCore::InitialiseWhiteAndBlacklist(bool bAddHardcoded, bool bAddDynamic)
329330
if (bAddDynamic)
330331
{
331332
// Hardcoded whitelist
332-
static SString whitelist[] = {
333-
"google.com", "youtube.com", "www.youtube-nocookie.com", "vimeo.com", "player.vimeo.com", "code.jquery.com", "mtasa.com",
334-
"multitheftauto.com", "mtavc.com", "www.googleapis.com", "ajax.googleapis.com"};
333+
static SString whitelist[] = {"google.com", "youtube.com", "www.youtube-nocookie.com", "vimeo.com", "player.vimeo.com",
334+
"code.jquery.com", "mtasa.com", "multitheftauto.com", "mtavc.com", "www.googleapis.com",
335+
"ajax.googleapis.com"};
335336

336337
// Hardcoded blacklist
337338
static SString blacklist[] = {"nobrain.dk"};
@@ -499,7 +500,7 @@ void CWebCore::ProcessInputMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
499500
// Alt-Gr check
500501
if ((keyEvent.type == KEYEVENT_CHAR) && isKeyDown(VK_RMENU))
501502
{
502-
HKL current_layout = ::GetKeyboardLayout(0);
503+
HKL current_layout = ::GetKeyboardLayout(0);
503504
SHORT scan_res = ::VkKeyScanExW(wParam, current_layout);
504505
if ((HIBYTE(scan_res) & (2 | 4)) == (2 | 4))
505506
{

Client/cefweb/CWebCore.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class CWebCore : public CWebCoreInterface
3939

4040
EventEntry(const std::function<void()>& callback_, CWebView* pWebView_) : callback(callback_), pWebView(pWebView_) {}
4141
#ifdef MTA_DEBUG
42-
EventEntry(const std::function<void()>& callback_, CWebView* pWebView_, const SString& name_)
43-
: callback(callback_), pWebView(pWebView_), name(name_)
44-
{
45-
}
42+
EventEntry(const std::function<void()>& callback_, CWebView* pWebView_, const SString& name_) : callback(callback_), pWebView(pWebView_), name(name_) {}
4643
#endif
4744
};
4845

Client/cefweb/CWebView.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ bool CWebView::GetFullPathFromLocal(SString& strPath)
458458
return;
459459

460460
result = m_pEventsInterface->Events_OnResourcePathCheck(strPath);
461-
}, this);
461+
},
462+
this);
462463

463464
return result;
464465
}
@@ -504,7 +505,8 @@ bool CWebView::VerifyFile(const SString& strPath, CBuffer& outFileData)
504505
return;
505506

506507
result = m_pEventsInterface->Events_OnResourceFileCheck(strPath, outFileData);
507-
}, this);
508+
},
509+
this);
508510

509511
return result;
510512
}
@@ -824,7 +826,7 @@ bool CWebView::OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>
824826
// //
825827
////////////////////////////////////////////////////////////////////
826828
CefResourceRequestHandler::ReturnValue CWebView::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
827-
CefRefPtr<CefRequestCallback> callback)
829+
CefRefPtr<CefRequestCallback> callback)
828830
{
829831
// Mostly the same as CWebView::OnBeforeBrowse
830832
CefURLParts urlParts;

Client/cefweb/CWebView.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ class CWebView : public CWebViewInterface,
131131
const CefString& failedURL) override;
132132

133133
// CefRequestHandler methods
134-
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool userGesture, bool isRedirect) override;
134+
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool userGesture,
135+
bool isRedirect) override;
135136
virtual CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
136137
CefRefPtr<CefRequest> request, bool is_navigation, bool is_download,
137138
const CefString& request_initiator, bool& disable_default_handling) override
@@ -141,7 +142,7 @@ class CWebView : public CWebViewInterface,
141142

142143
// CefResourceRequestHandler
143144
virtual CefResourceRequestHandler::ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
144-
CefRefPtr<CefRequestCallback> callback) override;
145+
CefRefPtr<CefRequestCallback> callback) override;
145146

146147
// CefLifeSpawnHandler methods
147148
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;

Client/cefweb/CefWeb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "StdInc.h"
1212
#include "SharedUtil.hpp"
1313

14-
CCoreInterface* g_pCore = NULL;
14+
CCoreInterface* g_pCore = NULL;
1515
CLocalizationInterface* g_pLocalization = nullptr;
1616

1717
extern "C" _declspec(dllexport) CWebCoreInterface* InitWebCoreInterface(CCoreInterface* pCore)

Client/cefweb/StdInc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
#include "CWebCore.h"
2222
#include "CWebView.h"
2323

24-
extern CCoreInterface* g_pCore;
24+
extern CCoreInterface* g_pCore;
2525
extern CLocalizationInterface* g_pLocalization;

Client/core/CAdditionalVertexStreamManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ bool CAdditionalVertexStreamManager::UpdateAdditionalStreamContent(SCurrentState
328328
for (uint i = 0; i < NumVerts; i++)
329329
{
330330
// Validate
331-
CVector& Normal = NormalList[i];
331+
CVector& Normal = NormalList[i];
332332
static constexpr float FLOAT_EPSILON = 0.0001f;
333333
if (Normal.Normalize() < FLOAT_EPSILON)
334334
Normal = CVector(0, 0, 1);

Client/core/CClientVariables.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ void CClientVariables::LoadDefaults()
351351
DEFAULT("browser_remote_javascript", true); // Execute javascript on remote websites?
352352
DEFAULT("filter_duplicate_log_lines", true); // Filter duplicate log lines for debug view and clientscript.log
353353
DEFAULT("discord_rich_presence", true); // Enable Discord Game SDK
354-
DEFAULT("always_show_transferbox", false); // Should the transfer box always be visible for downloads? (and ignore scripted control)
355-
DEFAULT("_beta_qc_rightclick_command", _S("reconnect")); // Command to run when right clicking quick connect (beta - can be removed at any time)
354+
DEFAULT("always_show_transferbox", false); // Should the transfer box always be visible for downloads? (and ignore scripted control)
355+
DEFAULT("_beta_qc_rightclick_command", _S("reconnect")); // Command to run when right clicking quick connect (beta - can be removed at any time)
356356

357357
if (!Exists("locale"))
358358
{

Client/core/CConnectManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ CConnectManager::~CConnectManager()
4646
g_pConnectManager = NULL;
4747
}
4848

49-
bool CConnectManager::Connect(const char* szHost, unsigned short usPort, const char* szNick, const char* szPassword, bool bNotifyServerBrowser, const char* szSecret)
49+
bool CConnectManager::Connect(const char* szHost, unsigned short usPort, const char* szNick, const char* szPassword, bool bNotifyServerBrowser,
50+
const char* szSecret)
5051
{
5152
assert(szHost);
5253
assert(szNick);

Client/core/CConnectManager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class CConnectManager
2121
CConnectManager();
2222
~CConnectManager();
2323

24-
bool Connect(const char* szHost, unsigned short usPort, const char* szNick, const char* szPassword, bool bNotifyServerBrowser = false, const char* szSecret = nullptr);
24+
bool Connect(const char* szHost, unsigned short usPort, const char* szNick, const char* szPassword, bool bNotifyServerBrowser = false,
25+
const char* szSecret = nullptr);
2526
bool Reconnect(const char* szHost, unsigned short usPort, const char* szPassword, bool bSave = true);
2627

2728
bool Abort();

0 commit comments

Comments
 (0)