diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-06-04 14:59:37 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-06-04 14:59:48 -0700 |
commit | cc41b039e6ba2a24c0ded9fb573bee6050aa2ac9 (patch) | |
tree | 030fa871567ccdcbc839325afc9cc533df2e981e /launcher/Usable.h | |
parent | 7e0e1ec51dfbcd49204f8e8e7e82b72c9931db11 (diff) | |
download | PrismLauncher-cc41b039e6ba2a24c0ded9fb573bee6050aa2ac9.tar.gz PrismLauncher-cc41b039e6ba2a24c0ded9fb573bee6050aa2ac9.tar.bz2 PrismLauncher-cc41b039e6ba2a24c0ded9fb573bee6050aa2ac9.zip |
chore: clean up after new compiler warnings
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/Usable.h')
-rw-r--r-- | launcher/Usable.h | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/launcher/Usable.h b/launcher/Usable.h index a3e880f3..f5818cbb 100644 --- a/launcher/Usable.h +++ b/launcher/Usable.h @@ -12,28 +12,20 @@ class Usable; * * @see UseLock */ -class Usable -{ +class Usable { friend class UseLock; -public: - std::size_t useCount() const - { - return m_useCount; - } - bool isInUse() const - { - return m_useCount > 0; - } -protected: - virtual void decrementUses() - { - m_useCount--; - } - virtual void incrementUses() - { - m_useCount++; - } -private: + + public: + virtual ~Usable() {} + + std::size_t useCount() const { return m_useCount; } + bool isInUse() const { return m_useCount > 0; } + + protected: + virtual void decrementUses() { m_useCount--; } + virtual void incrementUses() { m_useCount++; } + + private: std::size_t m_useCount = 0; }; |