diff options
| author | 2020-08-29 14:23:35 -0400 | |
|---|---|---|
| committer | 2020-08-29 14:23:41 -0400 | |
| commit | cde658cb271afb1484ddc89bde6a1979046a239d (patch) | |
| tree | e1489987b652b89293e96002779d982b5c41efdb /src | |
| parent | Merge pull request #4600 from lioncash/prototype (diff) | |
| download | yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.gz yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.xz yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.zip | |
game_list_p: Mark some constants as constexpr
Consistency change with how we mark constants in the rest of the
codebase.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/game_list_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index 0cd0054c8..eb1bf0775 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h | |||
| @@ -49,10 +49,10 @@ class GameListItem : public QStandardItem { | |||
| 49 | 49 | ||
| 50 | public: | 50 | public: |
| 51 | // used to access type from item index | 51 | // used to access type from item index |
| 52 | static const int TypeRole = Qt::UserRole + 1; | 52 | static constexpr int TypeRole = Qt::UserRole + 1; |
| 53 | static const int SortRole = Qt::UserRole + 2; | 53 | static constexpr int SortRole = Qt::UserRole + 2; |
| 54 | GameListItem() = default; | 54 | GameListItem() = default; |
| 55 | GameListItem(const QString& string) : QStandardItem(string) { | 55 | explicit GameListItem(const QString& string) : QStandardItem(string) { |
| 56 | setData(string, SortRole); | 56 | setData(string, SortRole); |
| 57 | } | 57 | } |
| 58 | }; | 58 | }; |
| @@ -65,10 +65,10 @@ public: | |||
| 65 | */ | 65 | */ |
| 66 | class GameListItemPath : public GameListItem { | 66 | class GameListItemPath : public GameListItem { |
| 67 | public: | 67 | public: |
| 68 | static const int TitleRole = SortRole + 1; | 68 | static constexpr int TitleRole = SortRole + 1; |
| 69 | static const int FullPathRole = SortRole + 2; | 69 | static constexpr int FullPathRole = SortRole + 2; |
| 70 | static const int ProgramIdRole = SortRole + 3; | 70 | static constexpr int ProgramIdRole = SortRole + 3; |
| 71 | static const int FileTypeRole = SortRole + 4; | 71 | static constexpr int FileTypeRole = SortRole + 4; |
| 72 | 72 | ||
| 73 | GameListItemPath() = default; | 73 | GameListItemPath() = default; |
| 74 | GameListItemPath(const QString& game_path, const std::vector<u8>& picture_data, | 74 | GameListItemPath(const QString& game_path, const std::vector<u8>& picture_data, |
| @@ -131,7 +131,7 @@ public: | |||
| 131 | class GameListItemCompat : public GameListItem { | 131 | class GameListItemCompat : public GameListItem { |
| 132 | Q_DECLARE_TR_FUNCTIONS(GameListItemCompat) | 132 | Q_DECLARE_TR_FUNCTIONS(GameListItemCompat) |
| 133 | public: | 133 | public: |
| 134 | static const int CompatNumberRole = SortRole; | 134 | static constexpr int CompatNumberRole = SortRole; |
| 135 | GameListItemCompat() = default; | 135 | GameListItemCompat() = default; |
| 136 | explicit GameListItemCompat(const QString& compatibility) { | 136 | explicit GameListItemCompat(const QString& compatibility) { |
| 137 | setData(type(), TypeRole); | 137 | setData(type(), TypeRole); |
| @@ -181,7 +181,7 @@ public: | |||
| 181 | */ | 181 | */ |
| 182 | class GameListItemSize : public GameListItem { | 182 | class GameListItemSize : public GameListItem { |
| 183 | public: | 183 | public: |
| 184 | static const int SizeRole = SortRole; | 184 | static constexpr int SizeRole = SortRole; |
| 185 | 185 | ||
| 186 | GameListItemSize() = default; | 186 | GameListItemSize() = default; |
| 187 | explicit GameListItemSize(const qulonglong size_bytes) { | 187 | explicit GameListItemSize(const qulonglong size_bytes) { |
| @@ -217,7 +217,7 @@ public: | |||
| 217 | 217 | ||
| 218 | class GameListDir : public GameListItem { | 218 | class GameListDir : public GameListItem { |
| 219 | public: | 219 | public: |
| 220 | static const int GameDirRole = Qt::UserRole + 2; | 220 | static constexpr int GameDirRole = Qt::UserRole + 2; |
| 221 | 221 | ||
| 222 | explicit GameListDir(UISettings::GameDir& directory, | 222 | explicit GameListDir(UISettings::GameDir& directory, |
| 223 | GameListItemType dir_type = GameListItemType::CustomDir) | 223 | GameListItemType dir_type = GameListItemType::CustomDir) |