From 258c13ba8cc8d054b803a04c433a766d0c5a1e8f Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Tue, 27 Dec 2022 10:31:24 +0100 Subject: [PATCH] Remove redundant extern modifier for function declarations Functions have external linkage by default, so there's no need to declare them extern. closes https://github.com/official-stockfish/Stockfish/pull/4308 No functional change --- src/position.h | 2 +- src/psqt.h | 2 +- src/uci.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/position.h b/src/position.h index 078ff5b7..90247cb1 100644 --- a/src/position.h +++ b/src/position.h @@ -204,7 +204,7 @@ private: bool chess960; }; -extern std::ostream& operator<<(std::ostream& os, const Position& pos); +std::ostream& operator<<(std::ostream& os, const Position& pos); inline Color Position::side_to_move() const { return sideToMove; diff --git a/src/psqt.h b/src/psqt.h index 4ee0e379..bd78be90 100644 --- a/src/psqt.h +++ b/src/psqt.h @@ -30,7 +30,7 @@ namespace Stockfish::PSQT extern Score psq[PIECE_NB][SQUARE_NB]; // Fill psqt array from a set of internally linked parameters -extern void init(); +void init(); } // namespace Stockfish::PSQT diff --git a/src/uci.cpp b/src/uci.cpp index 5d842d25..dc5f10e1 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -36,7 +36,7 @@ using namespace std; namespace Stockfish { -extern vector setup_bench(const Position&, istream&); +vector setup_bench(const Position&, istream&); namespace { -- 2.39.2