Upgrade wpiformat and use clang-format's include sorting (#8350)

This PR also uses the newly added -default-branch flag to generate the list of changed files with respect to the correct branch (2027).
This commit is contained in:
Tyler Veness
2025-11-11 18:05:12 -08:00
committed by GitHub
parent a0f4727179
commit 1705b2d61c
321 changed files with 677 additions and 628 deletions

View File

@@ -18,15 +18,3 @@ generatedFileExclude {
repoRootNameOverride {
glass
}
includeOtherLibs {
^GLFW
^fmt/
^imgui
^upb/
}
includeProject {
wpi/gui/portable-file-dialogs.h
wpi/util/expected
}

View File

@@ -5,9 +5,12 @@
#include "camerasupport.hpp"
#ifdef _WIN32
#include "Windows.h"
#include "delayimp.h"
#include <windows.h>
#include <delayimp.h>
#pragma comment(lib, "delayimp.lib")
static int CheckDelayException(int exception_value) {
if (exception_value ==
VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND) ||
@@ -16,9 +19,11 @@ static int CheckDelayException(int exception_value) {
// This example just executes the handler.
return EXCEPTION_EXECUTE_HANDLER;
}
// Don't attempt to handle other errors
return EXCEPTION_CONTINUE_SEARCH;
}
static bool TryDelayLoadAllImports(LPCSTR szDll) {
__try {
HRESULT hr = __HrLoadAllImportsForDll(szDll);
@@ -30,7 +35,9 @@ static bool TryDelayLoadAllImports(LPCSTR szDll) {
}
return true;
}
namespace wpi::glass {
bool HasCameraSupport() {
bool hasCameraSupport = false;
hasCameraSupport = TryDelayLoadAllImports("MF.dll");
@@ -42,11 +49,17 @@ bool HasCameraSupport() {
}
return hasCameraSupport;
}
} // namespace wpi::glass
#else
namespace wpi::glass {
bool HasCameraSupport() {
return true;
}
} // namespace wpi::glass
#endif

View File

@@ -27,10 +27,6 @@
#include <imgui_stdlib.h>
#include <implot.h>
#include <implot_internal.h>
#include "wpi/util/Signal.h"
#include "wpi/util/SmallString.hpp"
#include "wpi/util/SmallVector.hpp"
#include "wpi/util/timestamp.h"
#include "wpi/glass/Context.hpp"
#include "wpi/glass/DataSource.hpp"
@@ -38,6 +34,10 @@
#include "wpi/glass/support/ColorSetting.hpp"
#include "wpi/glass/support/EnumSetting.hpp"
#include "wpi/glass/support/ExtraGuiWidgets.hpp"
#include "wpi/util/Signal.h"
#include "wpi/util/SmallString.hpp"
#include "wpi/util/SmallVector.hpp"
#include "wpi/util/timestamp.h"
using namespace wpi::glass;