Skip to content

Commit

Permalink
Fix qx-versionnumber const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Jul 23, 2023
1 parent 5c4b3a0 commit d1d6049
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/core/include/qx/core/qx-versionnumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class QX_CORE_EXPORT VersionNumber : public QVersionNumber

//-Member Functions--------------------------------------------------------------------------------------------
public:
VersionNumber first(qsizetype n);
int nanoVersion();
VersionNumber normalized(qsizetype min = 0);
VersionNumber first(qsizetype n) const;
int nanoVersion() const;
VersionNumber normalized(qsizetype min = 0) const;

//-Class Functions---------------------------------------------------------------------------------------------
public:
Expand Down
6 changes: 3 additions & 3 deletions lib/core/src/qx-versionnumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ VersionNumber::VersionNumber() : QVersionNumber() {}
*
* @sa commonPrefix().
*/
VersionNumber VersionNumber::first(qsizetype n)
VersionNumber VersionNumber::first(qsizetype n) const
{
if(n < 0)
n = 0;
Expand All @@ -98,7 +98,7 @@ VersionNumber VersionNumber::first(qsizetype n)
*
* @sa isNull(), segmentAt().
*/
int VersionNumber::nanoVersion() { return segmentAt(3); }
int VersionNumber::nanoVersion() const { return segmentAt(3); }


/*!
Expand All @@ -109,7 +109,7 @@ int VersionNumber::nanoVersion() { return segmentAt(3); }
*
* @snippet qx-versionnumber.cpp 0
*/
VersionNumber VersionNumber::normalized(qsizetype min)
VersionNumber VersionNumber::normalized(qsizetype min) const
{
if(min < 0)
min = 0;
Expand Down

0 comments on commit d1d6049

Please sign in to comment.