From 7864fc0950729621c0297389f5b47d27e4d41d8f Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Fri, 22 Jan 2021 21:18:54 +0100 Subject: Use constant for minimum/maximum priorities. --- src/profile.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/profile.h') 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 Ptr; + using Ptr = boost::shared_ptr; + +public: + + // the minimum and maximum priority achievable by mods + // + static constexpr int MinimumPriority = 0; + static constexpr int MaximumPriority = std::numeric_limits::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 -- cgit v1.3.1