From: Sebastian Buchwald Date: Tue, 27 Dec 2022 09:31:24 +0000 (+0100) Subject: Remove redundant extern modifier for function declarations X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=258c13ba8cc8d054b803a04c433a766d0c5a1e8f 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 --- 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 {