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<FILE,
    PipeDeleter> 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 <cstdio> in misc.h, so that include is dropped as well.

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

No functional change
This commit is contained in:
ConKirby
2026-07-16 08:16:29 +02:00
committed by Joost VandeVondele
parent 9a8dd81dd7
commit ca11d43709
2 changed files with 1 additions and 14 deletions
+1
View File
@@ -60,6 +60,7 @@ Ciekce
clefrks
Clemens L. (rn5f107s2)
Cody Ho (aesrentai)
Con Kirby (ConKirby)
CSTENTOR
Dale Weiler (graphitemaster)
Dalton Hanaway (dhanaway)
-14
View File
@@ -26,7 +26,6 @@
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <exception> // IWYU pragma: keep
// IWYU pragma: no_include <__exception/terminate.h>
#include <functional>
@@ -138,19 +137,6 @@ std::optional<usize> 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<std::string> read_file_to_string(const std::string& path);