Commit ad636b52 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use nullptr

GIT_SILENT
parent 7881a451
......@@ -40,7 +40,7 @@ public:
/**
* The KJumpingCube AI_Box constructor.
*/
explicit AI_Box (QObject * parent = 0, int side = 5);
explicit AI_Box (QObject * parent = nullptr, int side = 5);
virtual ~AI_Box();
int side() const { return m_side; }
......@@ -83,7 +83,7 @@ public:
};
bool doMove (Player player, int index,
MoveUndodata * undodata = 0, QList<int> * steps = 0);
MoveUndodata * undodata = nullptr, QList<int> * steps = nullptr);
void undoMove (MoveUndodata * undodata);
#if AILog > 0
void printBox();
......
......@@ -134,7 +134,7 @@ AI_Main::~AI_Main()
void AI_Main::setSkill (int skill1, bool kepler1, bool newton1,
int skill2, bool kepler2, bool newton2)
{
m_ai[0] = 0;
m_ai[0] = nullptr;
m_ai[1] = kepler1 ? m_AI_Kepler : m_AI_Newton;
m_ai[2] = kepler2 ? m_AI_Kepler : m_AI_Newton;
......
......@@ -53,7 +53,7 @@ Game::Game (const int d, KCubeBoxWidget * view, QWidget * parent)
m_newSettings (false),
m_parent (parent),
m_view (view),
m_settingsPage (0),
m_settingsPage (nullptr),
m_side (d),
m_currentPlayer (One),
m_index (0),
......@@ -362,7 +362,7 @@ void Game::doMove (int index)
emit setAction (UNDO, true); // Update Undo and Redo actions.
emit setAction (REDO, false);
m_steps->clear();
bool won = m_box->doMove (m_currentPlayer, index, 0, m_steps);
bool won = m_box->doMove (m_currentPlayer, index, nullptr, m_steps);
#if AILog > 1
qCDebug(KJUMPINGCUBE_LOG) << "GAME WON?" << won << "STEPS" << (* m_steps);
// m_box->printBox();
......
......@@ -44,7 +44,7 @@ class Game : public QObject
{
Q_OBJECT
public:
explicit Game (const int dim, KCubeBoxWidget * view, QWidget * parent = 0);
explicit Game (const int dim, KCubeBoxWidget * view, QWidget * parent = nullptr);
virtual ~Game();
......
......@@ -39,7 +39,7 @@ class KCubeBoxWidget : public QWidget
{
Q_OBJECT
public:
explicit KCubeBoxWidget (const int dim = 1, QWidget * parent = 0);
explicit KCubeBoxWidget (const int dim = 1, QWidget * parent = nullptr);
virtual ~KCubeBoxWidget();
......
......@@ -58,7 +58,7 @@ KCubeWidget::KCubeWidget (QWidget* parent)
m_owner = Nobody;
m_value = 1;
pixmaps = 0;
pixmaps = nullptr;
blinking = None;
// show values
......@@ -160,7 +160,7 @@ void KCubeWidget::mouseReleaseEvent(QMouseEvent *e)
void KCubeWidget::paintEvent(QPaintEvent * /* ev unused */)
{
if ((pixmaps == 0) || (pixmaps->isEmpty()))
if ((pixmaps == nullptr) || (pixmaps->isEmpty()))
return;
int width = this->width();
......
......@@ -40,7 +40,7 @@ class KCubeWidget : public QFrame
public:
/** constructs a new KCubeWidget*/
explicit KCubeWidget (QWidget * parent = 0);
explicit KCubeWidget (QWidget * parent = nullptr);
virtual ~KCubeWidget();
Player owner() { return m_owner; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment