Commit 5d826cc1 authored by Jeremy Whiting's avatar Jeremy Whiting
Browse files

Fix minor cppcheck issues.

parent 26a586f4
Pipeline #165851 passed with stage
in 1 minute and 6 seconds
......@@ -582,7 +582,7 @@ bool KanagramGame::checkWord()
}
}
bool KanagramGame::isAnagram(QString& enteredword, QString& word)
bool KanagramGame::isAnagram(const QString& enteredword, const QString& word)
{
QString test = word;
if (enteredword.length() <= word.length())
......@@ -608,7 +608,7 @@ bool KanagramGame::isAnagram(QString& enteredword, QString& word)
return false;
}
QString KanagramGame::stripAccents(QString& original)
QString KanagramGame::stripAccents(const QString& original)
{
QString noAccents;
QString decomposed = original.normalized(QString::NormalizationForm_D);
......
......@@ -186,7 +186,7 @@ class KanagramGame : public QObject
/** Use the previous vocabulary file in the list */
void previousVocabulary();
#ifdef HAVE_SPEECH
#ifdef HAVE_SPEECH
/** The word was revealed (or correctly entered), so play the audio, say it, or play right.ogg */
void wordRevealed();
#endif
......@@ -256,10 +256,10 @@ class KanagramGame : public QObject
int getNumericSetting(const QString &settingString);
/** Check if enteredword is an anagram of word */
bool isAnagram(QString& enteredword, QString& word);
bool isAnagram(const QString &enteredword, const QString &word);
/** Remove accent characters from a word */
QString stripAccents(QString& original);
QString stripAccents(const QString &original);
/** Load score settings into local variables */
void loadSettings();
......
Supports Markdown
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