]> git.sesse.net Git - stockfish/commitdiff
Remove redundant extern modifier for function declarations
authorSebastian Buchwald <UniQP@web.de>
Tue, 27 Dec 2022 09:31:24 +0000 (10:31 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 1 Jan 2023 11:26:36 +0000 (12:26 +0100)
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
src/psqt.h
src/uci.cpp

index 078ff5b79f23e9e2d85b943734f2c4713bbbb3bd..90247cb1823d97ce19ef9edba49999c7043d9810 100644 (file)
@@ -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;
index 4ee0e379b145b5262ff53b413904813b229ecad2..bd78be90f232133d59d0c87069afd5f3036e8214 100644 (file)
@@ -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
 
index 5d842d25e73b6635b1472d2fead5eb525f602336..dc5f10e12f2d0ab434793791dcfa6ab73c89b5dc 100644 (file)
@@ -36,7 +36,7 @@ using namespace std;
 
 namespace Stockfish {
 
-extern vector<string> setup_bench(const Position&, istream&);
+vector<string> setup_bench(const Position&, istream&);
 
 namespace {