diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-22 21:18:54 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-22 21:18:54 +0100 |
| commit | 7864fc0950729621c0297389f5b47d27e4d41d8f (patch) | |
| tree | 9917895115a735af45086d52e005363f9c7a8726 /src/profile.h | |
| parent | d94b7c444d02e070875026d8c037fbd9700d2ca8 (diff) | |
Use constant for minimum/maximum priorities.
Diffstat (limited to 'src/profile.h')
| -rw-r--r-- | src/profile.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/profile.h b/src/profile.h index d1e3f104..672a2c13 100644 --- a/src/profile.h +++ b/src/profile.h @@ -52,7 +52,14 @@ class Profile : public QObject, public MOBase::IProfile public: - typedef boost::shared_ptr<Profile> Ptr; + using Ptr = boost::shared_ptr<Profile>; + +public: + + // the minimum and maximum priority achievable by mods + // + static constexpr int MinimumPriority = 0; + static constexpr int MaximumPriority = std::numeric_limits<int>::max(); public: @@ -283,7 +290,8 @@ public: // [old priority, new priority] such that no gaps are possible // // the priority is clamped in the range of valid priority (>= 0, and lower than - // the number of "regular" mods) + // the number of "regular" mods), you should use MinimumPriority or MaximumPriority + // to send a mod to the "top" or "bottom" of the priority list // // the function returns true if the priority was changed, or false if the mod // was already at the given priority (or if the priority of the mod cannot be |
