diff --git a/benchmarks/apple_arm_events.h b/benchmarks/apple_arm_events.h index f127d14..74d233c 100644 --- a/benchmarks/apple_arm_events.h +++ b/benchmarks/apple_arm_events.h @@ -618,8 +618,7 @@ typedef struct { } lib_symbol; #define lib_nelems(x) (sizeof(x) / sizeof((x)[0])) -#define lib_symbol_def(name) \ - { #name, (void **)&name } +#define lib_symbol_def(name) {#name, (void **)&name} static const lib_symbol lib_symbols_kperf[] = { lib_symbol_def(kpc_pmu_version), diff --git a/format.cmd b/format.cmd new file mode 100644 index 0000000..9b9af7f --- /dev/null +++ b/format.cmd @@ -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! \ No newline at end of file diff --git a/tests/random_string.cpp b/tests/random_string.cpp index 940cd7a..cb5b071 100644 --- a/tests/random_string.cpp +++ b/tests/random_string.cpp @@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) { class RandomEngine { public: RandomEngine() = delete; - RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){}; + RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {}; uint64_t next() { // Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h diff --git a/tests/short_random_string.cpp b/tests/short_random_string.cpp index 9008bf3..f47509d 100644 --- a/tests/short_random_string.cpp +++ b/tests/short_random_string.cpp @@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) { class RandomEngine { public: RandomEngine() = delete; - RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){}; + RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {}; uint64_t next() { // Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h