Fix clang-format complaints

Somehow we forgot to add shm.h & shm_linux.h to the list of headers to be
formatted.

closes https://github.com/official-stockfish/Stockfish/pull/6591

No functional change
This commit is contained in:
Disservin
2026-02-04 17:34:11 +01:00
committed by Joost VandeVondele
parent 0d26c61ff2
commit 1018879fe1
3 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ HEADERS = benchmark.h bitboard.h evaluate.h misc.h movegen.h movepick.h history.
nnue/layers/clipped_relu.h nnue/layers/sqr_clipped_relu.h nnue/nnue_accumulator.h \ nnue/layers/clipped_relu.h nnue/layers/sqr_clipped_relu.h nnue/nnue_accumulator.h \
nnue/nnue_architecture.h nnue/nnue_common.h nnue/nnue_feature_transformer.h nnue/simd.h \ nnue/nnue_architecture.h nnue/nnue_common.h nnue/nnue_feature_transformer.h nnue/simd.h \
position.h search.h syzygy/tbprobe.h thread.h thread_win32_osx.h timeman.h \ position.h search.h syzygy/tbprobe.h thread.h thread_win32_osx.h timeman.h \
tt.h tune.h types.h uci.h ucioption.h perft.h nnue/network.h engine.h score.h numa.h memory.h tt.h tune.h types.h uci.h ucioption.h perft.h nnue/network.h engine.h score.h numa.h memory.h shm.h shm_linux.h
OBJS = $(notdir $(SRCS:.cpp=.o)) OBJS = $(notdir $(SRCS:.cpp=.o))
+2 -1
View File
@@ -535,7 +535,8 @@ struct SystemWideSharedConstant {
std::size_t executable_hash = hash_string(getExecutablePathHash()); std::size_t executable_hash = hash_string(getExecutablePathHash());
char buf[1024]; char buf[1024];
std::snprintf(buf, sizeof(buf), "Local\\sf_%zu$%zu$%zu", content_hash, executable_hash, discriminator); std::snprintf(buf, sizeof(buf), "Local\\sf_%zu$%zu$%zu", content_hash, executable_hash,
discriminator);
std::string shm_name = buf; std::string shm_name = buf;
#if defined(__linux__) && !defined(__ANDROID__) #if defined(__linux__) && !defined(__ANDROID__)
+3 -2
View File
@@ -20,7 +20,7 @@
#define SHM_LINUX_H_INCLUDED #define SHM_LINUX_H_INCLUDED
#if !defined(__linux__) || defined(__ANDROID__) #if !defined(__linux__) || defined(__ANDROID__)
#error shm_linux.h should not be included on this platform. #error shm_linux.h should not be included on this platform.
#endif #endif
#include <atomic> #include <atomic>
@@ -82,7 +82,8 @@ class SharedMemoryRegistry {
static void unregister_instance(SharedMemoryBase* instance) { static void unregister_instance(SharedMemoryBase* instance) {
std::scoped_lock lock(registry_mutex_); std::scoped_lock lock(registry_mutex_);
active_instances_.erase( active_instances_.erase(
std::remove(active_instances_.begin(), active_instances_.end(), instance), active_instances_.end()); std::remove(active_instances_.begin(), active_instances_.end(), instance),
active_instances_.end());
} }
static void cleanup_all(bool skip_unmap = false) noexcept { static void cleanup_all(bool skip_unmap = false) noexcept {