Skip to content

Commit

Permalink
fixed constness
Browse files Browse the repository at this point in the history
  • Loading branch information
Robosturm committed Apr 27, 2024
1 parent dcea120 commit 191830b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions coreengine/gameversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ void GameVersion::setSufix(const QString & newSufix)
m_sufix = newSufix;
}

bool GameVersion::operator==(const GameVersion& other)
bool GameVersion::operator==(const GameVersion& other) const
{
return m_major == other.m_major &&
m_minor == other.m_minor &&
m_revision == other.m_revision &&
m_sufix == other.m_sufix;
}

bool GameVersion::operator!=(const GameVersion& other)
bool GameVersion::operator!=(const GameVersion& other) const
{
return !(*this == other);
}

bool GameVersion::operator>=(const GameVersion& other)
bool GameVersion::operator>=(const GameVersion& other) const
{
if (m_major > other.m_major)
{
Expand Down
6 changes: 3 additions & 3 deletions coreengine/gameversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class GameVersion : public FileSerializable
void setSufix(const QString & newSufix);
QString getSufix() const;

bool operator>=(const GameVersion& other);
bool operator==(const GameVersion& other);
bool operator!=(const GameVersion& other);
bool operator>=(const GameVersion& other) const;
bool operator==(const GameVersion& other) const;
bool operator!=(const GameVersion& other) const;
private:

qint32 m_major = VERSION_MAJOR;
Expand Down

0 comments on commit 191830b

Please sign in to comment.