summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-21 10:06:53 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-21 10:06:53 +0100
commit8b499044fd3b8ac60d356b7947680fcb011bfd80 (patch)
treead2d50b1153f6ac4f1d50f409ba6a7f19db937ca
parent5e78a4172da975ac227779456e670492217de206 (diff)
Avoid the use of structured bindings
-rw-r--r--src/ChessArbiter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ChessArbiter.cpp b/src/ChessArbiter.cpp
index e747397..0103b2a 100644
--- a/src/ChessArbiter.cpp
+++ b/src/ChessArbiter.cpp
@@ -370,8 +370,8 @@ bool ChessArbiter::IsDrawByNoMoves() {
}
bool ChessArbiter::IsDrawByRepetitions() {
- for (auto const &[key, val] : positions) {
- if (val >= 3) {
+ for (auto const &pos : positions) {
+ if (pos.second >= 3) {
return (true);
}
}
@@ -502,8 +502,8 @@ std::string ChessArbiter::ParseSAN(std::string SANMove) {
}
// Ensure that we return empty string if no matches
- if(src.size()<=0){
- return("");
+ if (src.size() <= 0) {
+ return ("");
}
// Else return "srcdst" string
return (src + dst);