mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-08 13:08:29 +02:00
Make BaseVersion const-correct in order to remove const-cast from Meta::Version
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
b7b06c0e48
commit
5ef61aa445
7 changed files with 33 additions and 33 deletions
|
|
@ -30,21 +30,21 @@ class BaseVersion {
|
|||
* A string used to identify this version in config files.
|
||||
* This should be unique within the version list or shenanigans will occur.
|
||||
*/
|
||||
virtual QString descriptor() = 0;
|
||||
virtual QString descriptor() const = 0;
|
||||
|
||||
/*!
|
||||
* The name of this version as it is displayed to the user.
|
||||
* For example: "1.5.1"
|
||||
*/
|
||||
virtual QString name() = 0;
|
||||
virtual QString name() const = 0;
|
||||
|
||||
/*!
|
||||
* This should return a string that describes
|
||||
* the kind of version this is (Stable, Beta, Snapshot, whatever)
|
||||
*/
|
||||
virtual QString typeString() const = 0;
|
||||
virtual bool operator<(BaseVersion& a) { return name() < a.name(); }
|
||||
virtual bool operator>(BaseVersion& a) { return name() > a.name(); }
|
||||
virtual bool operator<(BaseVersion& a) const { return name() < a.name(); }
|
||||
virtual bool operator>(BaseVersion& a) const { return name() > a.name(); }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(BaseVersion::Ptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue