clang-format.

This commit is contained in:
IRainman 2025-05-06 14:26:20 +03:00
parent a8c5bd9a38
commit 9049a1a511
4 changed files with 10 additions and 4 deletions

View File

@ -618,8 +618,7 @@ typedef struct {
} lib_symbol; } lib_symbol;
#define lib_nelems(x) (sizeof(x) / sizeof((x)[0])) #define lib_nelems(x) (sizeof(x) / sizeof((x)[0]))
#define lib_symbol_def(name) \ #define lib_symbol_def(name) {#name, (void **)&name}
{ #name, (void **)&name }
static const lib_symbol lib_symbols_kperf[] = { static const lib_symbol lib_symbols_kperf[] = {
lib_symbol_def(kpc_pmu_version), lib_symbol_def(kpc_pmu_version),

7
format.cmd Normal file
View File

@ -0,0 +1,7 @@
@echo off
echo Formatting with config...
for /R ".\" %%f in (*.cpp, *.h, *.c, *.hpp) do (
echo Formatting "%%f"
clang-format -i -style=file "%%f"
)
echo Done!

View File

@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) {
class RandomEngine { class RandomEngine {
public: public:
RandomEngine() = delete; RandomEngine() = delete;
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){}; RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {};
uint64_t next() { uint64_t next() {
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h // Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h

View File

@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) {
class RandomEngine { class RandomEngine {
public: public:
RandomEngine() = delete; RandomEngine() = delete;
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){}; RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {};
uint64_t next() { uint64_t next() {
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h // Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h