From 5b56069f45bbb58b8c3510a4d470e416d0d4dbbb Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sat, 15 Mar 2008 09:47:28 +0100 Subject: [PATCH] Report error conditions instead of just doing nothing. --- src/core/board.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/board.cpp b/src/core/board.cpp index 28ca58e..64366da 100644 --- a/src/core/board.cpp +++ b/src/core/board.cpp @@ -11,6 +11,8 @@ #include "board.h" #include "piece.h" +#include + Board::Board(const Point& size) : m_size(size) { m_data.resize(m_size.x * m_size.y); @@ -48,6 +50,8 @@ void Board::set(const Point& p, const Piece& piece) { if (valid(p)) { m_data[p.x + p.y * m_size.x] = piece; } + else + kError() << "point is not valid" << p; } bool Board::valid(const Point& p) const { -- 2.11.4.GIT