From 815b590dfe1a383ca3f5da6bad1b1da7ed29834c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 30 Aug 2021 00:17:24 +0200 Subject: [PATCH] Update clang-format to version 12 12 is the latest release and various editors (VS, VSCode and CLion) ship with clang-format 12 by default. --- Source/Core/Core/HW/WiimoteReal/IOWin.cpp | 2 +- Source/Core/Core/IOS/Network/SSL.h | 2 +- Source/Core/DiscIO/WIABlob.cpp | 4 ++-- Source/Core/VideoBackends/OGL/OGLRender.cpp | 19 ++++++++----------- Tools/lint.sh | 2 +- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp index ca27c26932..7f00cc57ee 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp @@ -27,9 +27,9 @@ #include "Common/Logging/Log.h" #include "Common/ScopeGuard.h" #include "Common/Thread.h" +#include "Core/HW/WiimoteCommon/DataReport.h" #include "Core/HW/WiimoteCommon/WiimoteConstants.h" #include "Core/HW/WiimoteCommon/WiimoteReport.h" -#include "Core/HW/WiimoteCommon/DataReport.h" #include "Core/HW/WiimoteReal/IOWin.h" // Create func_t function pointer type and declare a nullptr-initialized static variable of that diff --git a/Source/Core/Core/IOS/Network/SSL.h b/Source/Core/Core/IOS/Network/SSL.h index 18809a4807..eee750ed8f 100644 --- a/Source/Core/Core/IOS/Network/SSL.h +++ b/Source/Core/Core/IOS/Network/SSL.h @@ -18,8 +18,8 @@ // clang-format on #include "Common/CommonTypes.h" -#include "Core/IOS/IOS.h" #include "Core/IOS/Device.h" +#include "Core/IOS/IOS.h" namespace IOS::HLE { diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp index 471b830a4a..85e5508f7f 100644 --- a/Source/Core/DiscIO/WIABlob.cpp +++ b/Source/Core/DiscIO/WIABlob.cpp @@ -1457,8 +1457,8 @@ WIARVZFileReader::ProcessAndCompress(CompressThreadState* state, CompressPa compare_hashes(offsetof(HashBlock, padding_2), sizeof(HashBlock::padding_2)); } - static_assert(std::is_trivially_copyable_v); + static_assert(std::is_trivially_copyable_v< + typename decltype(CompressThreadState::decryption_buffer)::value_type>); if constexpr (RVZ) { // We must not store junk efficiently for chunks that may get reused at a position diff --git a/Source/Core/VideoBackends/OGL/OGLRender.cpp b/Source/Core/VideoBackends/OGL/OGLRender.cpp index 0f4101dc82..26cd912ec1 100644 --- a/Source/Core/VideoBackends/OGL/OGLRender.cpp +++ b/Source/Core/VideoBackends/OGL/OGLRender.cpp @@ -486,17 +486,14 @@ Renderer::Renderer(std::unique_ptr main_gl_context, float backbuffer_ if (m_main_gl_context->IsGLES()) { - g_ogl_config.SupportedESPointSize = - GLExtensions::Supports("GL_OES_geometry_point_size") ? - 1 : - GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 : 0; - g_ogl_config.SupportedESTextureBuffer = GLExtensions::Supports("VERSION_GLES_3_2") ? - EsTexbufType::TexbufCore : - GLExtensions::Supports("GL_OES_texture_buffer") ? - EsTexbufType::TexbufOes : - GLExtensions::Supports("GL_EXT_texture_buffer") ? - EsTexbufType::TexbufExt : - EsTexbufType::TexbufNone; + g_ogl_config.SupportedESPointSize = GLExtensions::Supports("GL_OES_geometry_point_size") ? 1 : + GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 : + 0; + g_ogl_config.SupportedESTextureBuffer = + GLExtensions::Supports("VERSION_GLES_3_2") ? EsTexbufType::TexbufCore : + GLExtensions::Supports("GL_OES_texture_buffer") ? EsTexbufType::TexbufOes : + GLExtensions::Supports("GL_EXT_texture_buffer") ? EsTexbufType::TexbufExt : + EsTexbufType::TexbufNone; supports_glsl_cache = true; g_ogl_config.bSupportsGLSync = true; diff --git a/Tools/lint.sh b/Tools/lint.sh index 75dcd7c325..51ea86d595 100755 --- a/Tools/lint.sh +++ b/Tools/lint.sh @@ -9,7 +9,7 @@ if ! [ -x "$(command -v git)" ]; then exit 1 fi -REQUIRED_CLANG_FORMAT_MAJOR=10 +REQUIRED_CLANG_FORMAT_MAJOR=12 REQUIRED_CLANG_FORMAT_MINOR=0 CLANG_FORMAT=clang-format CLANG_FORMAT_MAJOR=clang-format-${REQUIRED_CLANG_FORMAT_MAJOR}