summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-08-29 14:23:35 -0400
committerGravatar Lioncash2020-08-29 14:23:41 -0400
commitcde658cb271afb1484ddc89bde6a1979046a239d (patch)
treee1489987b652b89293e96002779d982b5c41efdb /src
parentMerge pull request #4600 from lioncash/prototype (diff)
downloadyuzu-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.h20
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
50public: 50public:
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 */
66class GameListItemPath : public GameListItem { 66class GameListItemPath : public GameListItem {
67public: 67public:
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:
131class GameListItemCompat : public GameListItem { 131class GameListItemCompat : public GameListItem {
132 Q_DECLARE_TR_FUNCTIONS(GameListItemCompat) 132 Q_DECLARE_TR_FUNCTIONS(GameListItemCompat)
133public: 133public:
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 */
182class GameListItemSize : public GameListItem { 182class GameListItemSize : public GameListItem {
183public: 183public:
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
218class GameListDir : public GameListItem { 218class GameListDir : public GameListItem {
219public: 219public:
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)