Run clang-tidy on OpenGL ES codepaths

This commit is contained in:
Chris Thrasher 2023-10-26 15:21:10 -06:00
parent e45628e2eb
commit 0512748fce
2 changed files with 11 additions and 10 deletions

View File

@ -225,6 +225,7 @@ jobs:
- { name: Windows, os: windows-2022, flags: -GNinja }
- { name: Linux, os: ubuntu-22.04 }
- { name: Linux DRM, os: ubuntu-22.04, flags: -DSFML_USE_DRM=TRUE }
- { name: Linux OpenGL ES, os: ubuntu-22.04, flags: -DSFML_OPENGL_ES=ON }
- { name: macOS, os: macos-12 }
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }
- { name: Android, os: ubuntu-22.04, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r23b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }

View File

@ -399,7 +399,7 @@ void EglContext::updateSettings()
#if defined(SFML_SYSTEM_LINUX) && !defined(SFML_USE_DRM)
////////////////////////////////////////////////////////////
XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsPerPixel, const ContextSettings& settings)
XVisualInfo EglContext::selectBestVisual(::Display* xDisplay, unsigned int bitsPerPixel, const ContextSettings& settings)
{
EglContextImpl::ensureInit();
@ -419,7 +419,7 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
// Should never happen...
err() << "No EGL visual found. You should check your graphics driver" << std::endl;
return XVisualInfo();
return {};
}
XVisualInfo vTemplate;
@ -427,14 +427,14 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
// Get X11 visuals compatible with this EGL config
int visualCount = 0;
auto availableVisuals = X11Ptr<XVisualInfo[]>(XGetVisualInfo(XDisplay, VisualIDMask, &vTemplate, &visualCount));
auto availableVisuals = X11Ptr<XVisualInfo[]>(XGetVisualInfo(xDisplay, VisualIDMask, &vTemplate, &visualCount));
if (visualCount == 0)
{
// Can't happen...
err() << "No X11 visual found. Bug in your EGL implementation ?" << std::endl;
return XVisualInfo();
return {};
}
// Pick up the best one