From ca11d43709446e2cd12400d67b6ffad9da49d786 Mon Sep 17 00:00:00 2001 From: ConKirby Date: Thu, 16 Jul 2026 08:16:29 +0200 Subject: [PATCH] Remove dead code left over from earlier refactors The following have zero references repo-wide: Move::to_sq_unchecked() (types.h): added in 542c30c2 for a branchless correction-history update; its only caller was removed in 5ae13d2b ("Remove Redundant Branchless Execution"), leaving the method unused. PipeDeleter (misc.h): the custom deleter for the std::unique_ptr that wrapped popen("lscpu"). That pipe was removed in c8375c2f ("On linux use sysfs instead of lscpu"), so the struct has been unused since. Dropping PipeDeleter also removes the last user of in misc.h, so that include is dropped as well. closes https://github.com/official-stockfish/Stockfish/pull/6948 No functional change --- AUTHORS | 1 + src/misc.h | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/AUTHORS b/AUTHORS index fe573fe50..3a9d91d63 100644 --- a/AUTHORS +++ b/AUTHORS @@ -60,6 +60,7 @@ Ciekce clefrks Clemens L. (rn5f107s2) Cody Ho (aesrentai) +Con Kirby (ConKirby) CSTENTOR Dale Weiler (graphitemaster) Dalton Hanaway (dhanaway) diff --git a/src/misc.h b/src/misc.h index 9c65d95ca..9dba99b1d 100644 --- a/src/misc.h +++ b/src/misc.h @@ -26,7 +26,6 @@ #include #include #include -#include #include // IWYU pragma: keep // IWYU pragma: no_include <__exception/terminate.h> #include @@ -138,19 +137,6 @@ std::optional str_to_size_t(const std::string& s); std::string utf8_from_wstring(std::wstring_view s); std::filesystem::path path_from_utf8(const std::string& path); -#if defined(__linux__) - -struct PipeDeleter { - void operator()(FILE* file) const { - if (file != nullptr) - { - pclose(file); - } - } -}; - -#endif - // Reads the file as bytes. // Returns std::nullopt if the file does not exist. std::optional read_file_to_string(const std::string& path);