mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
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:
committed by
Joost VandeVondele
parent
0d26c61ff2
commit
1018879fe1
+1
-1
@@ -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/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 \
|
||||
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))
|
||||
|
||||
|
||||
@@ -535,7 +535,8 @@ struct SystemWideSharedConstant {
|
||||
std::size_t executable_hash = hash_string(getExecutablePathHash());
|
||||
|
||||
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;
|
||||
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
|
||||
+3
-2
@@ -20,7 +20,7 @@
|
||||
#define SHM_LINUX_H_INCLUDED
|
||||
|
||||
#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
|
||||
|
||||
#include <atomic>
|
||||
@@ -82,7 +82,8 @@ class SharedMemoryRegistry {
|
||||
static void unregister_instance(SharedMemoryBase* instance) {
|
||||
std::scoped_lock lock(registry_mutex_);
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user