From 8f4708f5188488c79f2ef3f2ce7e4c6cde0e448a Mon Sep 17 00:00:00 2001 From: William JCM Date: Wed, 9 Mar 2022 13:25:26 +0100 Subject: [PATCH] Profile: provide shorthand getters. --- src/Profile/Profile.cpp | 8 ++++++++ src/Profile/Profile.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/Profile/Profile.cpp b/src/Profile/Profile.cpp index d791b84..c65fa6d 100644 --- a/src/Profile/Profile.cpp +++ b/src/Profile/Profile.cpp @@ -83,10 +83,18 @@ auto Profile::type() const -> ProfileType { return _type; } +auto Profile::isDemo() const -> bool { + return _type == ProfileType::Demo; +} + auto Profile::version() const -> ProfileVersion { return _version; } +auto Profile::isLegacy() const -> bool { + return _version == ProfileVersion::Legacy; +} + auto Profile::account() const -> Containers::StringView { return _account; } diff --git a/src/Profile/Profile.h b/src/Profile/Profile.h index 4da0a3d..ddc95e2 100644 --- a/src/Profile/Profile.h +++ b/src/Profile/Profile.h @@ -49,8 +49,10 @@ class Profile { auto filename() const -> Containers::StringView; auto type() const -> ProfileType; + auto isDemo() const -> bool; auto version() const -> ProfileVersion; + auto isLegacy() const -> bool; auto account() const -> Containers::StringView;