Commit d00904c5 authored by Laurent Montel's avatar Laurent Montel 😁

Fix clazy warning

parent 5e802abc
......@@ -599,7 +599,7 @@ void Game::smInitInput()
{
// Initialise or re-initialise the move-text parsing.
smDotCount = 0;
smTempString = "";
smTempString = QLatin1String("");
keyboardState = WaitingForInput;
}
......@@ -1546,7 +1546,7 @@ void Game::loadPuzzle (KConfig & config)
}
void Game::startUndo (QString code, QString header)
void Game::startUndo (const QString &code, const QString &header)
{
if (tooBusy())
return;
......@@ -1573,7 +1573,7 @@ void Game::startUndo (QString code, QString header)
}
void Game::startRedo (QString code, QString header)
void Game::startRedo (const QString &code, const QString &header)
{
if (tooBusy())
return;
......@@ -1702,7 +1702,7 @@ void Game::shuffleCube ()
}
}
void Game::startAnimation (QString dSeq, int sID, bool vShuffle, bool vMoves)
void Game::startAnimation (const QString &dSeq, int sID, bool vShuffle, bool vMoves)
{
// Set the scene ID, animation display sequence and whether to animate the
// shuffle and/or player moves or do them instantly (within one tick).
......
......@@ -286,8 +286,8 @@ private:
int pickANumber // Pick a number at random,
(int lo, int hi); // in the range (lo..hi).
void startUndo (QString code, QString header);
void startRedo (QString code, QString header);
void startUndo (const QString &code, const QString &header);
void startRedo (const QString &code, const QString &header);
/******************************************************************************/
/********************** METHODS TO SUPPORT ANIMATION *************************/
......@@ -298,7 +298,7 @@ private:
void forceImmediateMove (Move * move);
void truncateUndoneMoves(); // Delete all undone and not-redone moves.
void startAnimation (QString dSeq, int sID, bool vShuffle, bool vMoves);
void startAnimation (const QString &dSeq, int sID, bool vShuffle, bool vMoves);
void startNextDisplay(); // Start executing a step from displaySequence.
void startDemo(); // Start the demo sequence.
......
This diff is collapsed.
......@@ -51,7 +51,7 @@ void MoveTracker::init()
}
void MoveTracker::mouseInput (int sceneID, QList<CubeView *> cubeViews,
void MoveTracker::mouseInput (int sceneID, const QList<CubeView *> &cubeViews,
Cube * cube, MouseEvent event, int button, int mX, int mY)
{
if (event == ButtonDown) {
......@@ -74,7 +74,7 @@ void MoveTracker::mouseInput (int sceneID, QList<CubeView *> cubeViews,
}
void MoveTracker::trackCubeRotation (int sceneID, QList<CubeView *> cubeViews,
void MoveTracker::trackCubeRotation (int sceneID, const QList<CubeView *> &cubeViews,
MouseEvent event, int mX, int mY)
{
if (foundHandle) {
......@@ -202,7 +202,7 @@ bool MoveTracker::calculateRotation (const int mX, const int mY,
}
void MoveTracker::trackSliceMove (int sceneID, QList<CubeView *> cubeViews,
void MoveTracker::trackSliceMove (int sceneID, const QList<CubeView *> &cubeViews,
Cube * cube, MouseEvent event, int mX, int mY)
{
double position [nAxes];
......@@ -614,7 +614,7 @@ void MoveTracker::prepareWholeCubeMove (QList<Move *> & moveList,
int MoveTracker::findWhichCube (const int sceneID,
const QList<CubeView *> cubeViews, const double position[])
const QList<CubeView *> &cubeViews, const double position[])
{
// For some reason this function cannot compile with return-type CubeView *.
......
......@@ -48,7 +48,7 @@ public:
* cube-picture and sticker that the mouse is pointing to. Then it
* works out whether a cube-move has been completed.
*/
void mouseInput (int sceneID, QList<CubeView *> cubeViews,
void mouseInput (int sceneID, const QList<CubeView *> &cubeViews,
Cube * cube, MouseEvent event, int button, int mX, int mY);
void usersRotation(); // Perform the user's rotation when rendering.
......@@ -70,14 +70,14 @@ Q_SIGNALS:
void cubeRotated();
private:
void trackCubeRotation (int sceneID, QList<CubeView *> cubeViews,
void trackCubeRotation (int sceneID, const QList<CubeView *> &cubeViews,
MouseEvent event, int mX, int mY);
bool calculateRotation (const int mX, const int mY,
double axis [nAxes], double & degrees);
void trackSliceMove (int sceneID, QList<CubeView *> cubeViews,
void trackSliceMove (int sceneID, const QList<CubeView *> &cubeViews,
Cube * cube, MouseEvent event, int mX, int mY);
int findWhichCube (const int sceneID, const QList<CubeView *> cubeViews,
int findWhichCube (const int sceneID, const QList<CubeView *> &cubeViews,
const double position[]);
void makeWholeCubeMoveList (QList<Move *> & tempMoves,
......
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