File Fix-to-have-c++17-compatibility.patch of Package bovo4

From 7ce0af72c118c0f8b76e7fddf150550336376145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20USTA?= <omerusta@gmail.com>
Date: Sat, 7 Nov 2020 13:48:33 +0300
Subject: [PATCH] Fix to have c++17 compatibility

Dynamic throw is not acceptable in c++17
ISO C++17 does not allow dynamic exception specifications
---
 ai/aron/aiboard.cc | 17 ++++++++---------
 ai/aron/aiboard.h  | 16 ++++++++--------
 2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/ai/aron/aiboard.cc b/ai/aron/aiboard.cc
index 250bc91..cc02553 100644
--- a/ai/aron/aiboard.cc
+++ b/ai/aron/aiboard.cc
@@ -64,14 +64,14 @@ AiBoard::~AiBoard() {
     delete m_dimension;
 }
 
-bool AiBoard::empty(const Coord& c) const throw(outOfBounds) {
+bool AiBoard::empty(const Coord& c) const {
     if (!m_dimension->ok(c)) {
         throw outOfBounds();
     }
     return m_board[c.x()][c.y()].empty();
 }
 
-bool AiBoard::empty(const usi x, const usi y) const throw(outOfBounds) {
+bool AiBoard::empty(const usi x, const usi y) const {
     return empty(Coord(x, y));
 }
 
@@ -106,19 +106,18 @@ Coord* AiBoard::moves() {
     return new Coord();
 }
 
-Player AiBoard::player(const Coord& c) const throw(outOfBounds) {
+Player AiBoard::player(const Coord& c) const {
     if (!m_dimension->ok(c)) {
         throw outOfBounds();
     }
     return m_board[c.x()][c.y()].player();
 }
 
-Player AiBoard::player(const usi x, const usi y) const throw(outOfBounds) {
+Player AiBoard::player(const usi x, const usi y) const {
     return player(Coord(x, y));
 }
 
-bool AiBoard::setPlayer(const Move& move)
-  throw(busy, gameover, notValidPlayer) {
+bool AiBoard::setPlayer(const Move& move) {
     m_cleanBoard = false;
     zero(move.coord());
     m_board[move.coord().x()][move.coord().y()].setPlayer(move.player());
@@ -240,21 +239,21 @@ Coord AiBoard::evaluate() const {
     return v3.begin()->second;
 }
 
-uli AiBoard::points(const Coord& c) const throw(outOfBounds) {
+uli AiBoard::points(const Coord& c) const {
     if (!m_dimension->ok(c)) {
         throw outOfBounds();
     }
     return m_board[c.x()][c.y()].points();
 }
     
-void AiBoard::addPoints(const Coord& c, uli points) throw(outOfBounds) {
+void AiBoard::addPoints(const Coord& c, uli points) {
     if (!m_dimension->ok(c)) {
         throw outOfBounds();
     }
     m_board[c.x()][c.y()].setPoints(m_board[c.x()][c.y()].points() + points);
 }
 
-void AiBoard::setPoints(const Coord& c, uli points) throw(outOfBounds) {
+void AiBoard::setPoints(const Coord& c, uli points) {
     if (!m_dimension->ok(c)) {
         throw outOfBounds();
     }
diff --git a/ai/aron/aiboard.h b/ai/aron/aiboard.h
index 573bf14..d1005e6 100644
--- a/ai/aron/aiboard.h
+++ b/ai/aron/aiboard.h
@@ -109,7 +109,7 @@ public:
      * @param coord Coord to check
      * @return @c true if coord is empty, @c false otherwise
      */
-    bool empty(const Coord&) const throw(outOfBounds);
+    bool empty(const Coord&) const;
 
     /**
      * @brief is a Coord empty or set?
@@ -120,7 +120,7 @@ public:
      * @param y X-part of coordinate to check
      * @return @c true if coord is empty, @c false otherwise
      */
-    bool empty(const usi x, const usi y) const throw(outOfBounds);
+    bool empty(const usi x, const usi y) const;
 
     /**
      * @brief height of AiBoard
@@ -153,7 +153,7 @@ public:
      * @return @c X if player 1, @c O if player 2, @c No if empty
      * @throw outOfBounds if coord isn't on the playing board
      */
-    Player player(const Coord&) const throw(outOfBounds);
+    Player player(const Coord&) const;
 
     /**
      * @brief the player occupying a Coord
@@ -163,7 +163,7 @@ public:
      * @return @c X if player 1, @c O if player 2, @c No if empty
      * @throw outOfBounds if coord isn't on the playing board
      */
-    Player player(const usi x, const usi y) const throw(outOfBounds);
+    Player player(const usi x, const usi y) const;
 
     /**
      * @brief set the player of a Coord
@@ -177,7 +177,7 @@ public:
      * @throw gameOver if game was already over
      * @throw notValidPlayer if player wasn't X or O
      */
-    bool setPlayer(const Move& move) throw(busy, gameover, notValidPlayer);
+    bool setPlayer(const Move& move);
 
     /**
      * @brief change Skill
@@ -216,9 +216,9 @@ private:
     Coord evaluate() const;
 
     /* returns, adds och sets points on a given square. */
-    uli points(const Coord&) const throw(outOfBounds);
-    void addPoints(const Coord&, const uli points) throw(outOfBounds);
-    void setPoints(const Coord&, const uli points) throw(outOfBounds);
+    uli points(const Coord&) const;
+    void addPoints(const Coord&, const uli points);
+    void setPoints(const Coord&, const uli points);
 
     /* initialize this class */
     void setup();
-- 
GitLab

openSUSE Build Service is sponsored by