From d9ed8e498d184680c5ebcea0c092735797076e5b Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Sun, 18 Dec 2022 17:59:34 +0100 Subject: [PATCH] [Move] Lint --- Move.cpp | 32 +++++++++++++++----------------- Move.hpp | 12 ++++++------ 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Move.cpp b/Move.cpp index f151b37..dbeecab 100644 --- a/Move.cpp +++ b/Move.cpp @@ -2,16 +2,15 @@ #include -Move::Move(const Square& from, const Square& to, - const std::optional& promotion) -{ - (void)from; - (void)to; - (void)promotion; +Move::Move(const Square &from, const Square &to, + const std::optional &promotion) { + (void) from; + (void) to; + (void) promotion; } -Move::Optional Move::fromUci(const std::string& uci) { - (void)uci; +Move::Optional Move::fromUci(const std::string &uci) { + (void) uci; return std::nullopt; } @@ -27,20 +26,19 @@ std::optional Move::promotion() const { return std::nullopt; } -std::ostream& operator<<(std::ostream& os, const Move& move) { - (void)move; +std::ostream &operator<<(std::ostream &os, const Move &move) { + (void) move; return os; } - -bool operator<(const Move& lhs, const Move& rhs) { - (void)lhs; - (void)rhs; +bool operator<(const Move &lhs, const Move &rhs) { + (void) lhs; + (void) rhs; return false; } -bool operator==(const Move& lhs, const Move& rhs) { - (void)lhs; - (void)rhs; +bool operator==(const Move &lhs, const Move &rhs) { + (void) lhs; + (void) rhs; return false; } diff --git a/Move.hpp b/Move.hpp index a0f38b2..63ebf87 100644 --- a/Move.hpp +++ b/Move.hpp @@ -13,10 +13,10 @@ public: using Optional = std::optional; - Move(const Square& from, const Square& to, - const std::optional& promotion = std::nullopt); + Move(const Square &from, const Square &to, + const std::optional &promotion = std::nullopt); - static Optional fromUci(const std::string& uci); + static Optional fromUci(const std::string &uci); Square from() const; Square to() const; @@ -24,10 +24,10 @@ public: }; -std::ostream& operator<<(std::ostream& os, const Move& move); +std::ostream &operator<<(std::ostream &os, const Move &move); // Needed for std::map, std::set -bool operator<(const Move& lhs, const Move& rhs); -bool operator==(const Move& lhs, const Move& rhs); +bool operator<(const Move &lhs, const Move &rhs); +bool operator==(const Move &lhs, const Move &rhs); #endif