add a .clang-format file (#9154)

This commit is contained in:
Jorropo
2026-01-03 21:19:24 +01:00
committed by GitHub
parent abab6ce815
commit 0d11331d18
771 changed files with 77752 additions and 83184 deletions

View File

@@ -6,16 +6,13 @@
#include <stdint.h>
/// C++ v17+ clamp function, limits a given value to a range defined by lo and hi
template <class T> constexpr const T &clamp(const T &v, const T &lo, const T &hi)
{
return (v < lo) ? lo : (hi < v) ? hi : v;
}
template <class T> constexpr const T &clamp(const T &v, const T &lo, const T &hi) { return (v < lo) ? lo : (hi < v) ? hi : v; }
#if HAS_SCREEN
#define IF_SCREEN(X) \
if (screen) { \
X; \
}
#define IF_SCREEN(X) \
if (screen) { \
X; \
}
#else
#define IF_SCREEN(...)
#endif