summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-27 05:17:11 -0500
committerGravatar Lioncash2018-11-27 16:37:21 -0500
commit2a22c1b27e01f43395d035ebc017df4ba088a67c (patch)
treebaefee236ab465e14fe9b57820eda04dfe83ebe1 /src
parentyuzu/configure_input: Make CallConfigureDialog a non-member template function (diff)
downloadyuzu-2a22c1b27e01f43395d035ebc017df4ba088a67c.tar.gz
yuzu-2a22c1b27e01f43395d035ebc017df4ba088a67c.tar.xz
yuzu-2a22c1b27e01f43395d035ebc017df4ba088a67c.zip
yuzu/configure_input_player: Use std::size_t to represent the player index instead of u8
Prevents compiler warnings related to truncation when invoking the dialog. It's also extremely suspect to use a u8 value here instead of a more general type to begin with.
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp2
-rw-r--r--src/yuzu/configuration/configure_input_player.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 4a26684d8..7dadd83c1 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -104,7 +104,7 @@ static QString AnalogToText(const Common::ParamPackage& param, const std::string
104 } 104 }
105}; 105};
106 106
107ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, u8 player_index, bool debug) 107ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_index, bool debug)
108 : QDialog(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index(player_index), 108 : QDialog(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index(player_index),
109 debug(debug), timeout_timer(std::make_unique<QTimer>()), 109 debug(debug), timeout_timer(std::make_unique<QTimer>()),
110 poll_timer(std::make_unique<QTimer>()) { 110 poll_timer(std::make_unique<QTimer>()) {
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h
index 937f77998..7a53f6715 100644
--- a/src/yuzu/configuration/configure_input_player.h
+++ b/src/yuzu/configuration/configure_input_player.h
@@ -30,7 +30,7 @@ class ConfigureInputPlayer : public QDialog {
30 Q_OBJECT 30 Q_OBJECT
31 31
32public: 32public:
33 explicit ConfigureInputPlayer(QWidget* parent, u8 player_index, bool debug = false); 33 explicit ConfigureInputPlayer(QWidget* parent, std::size_t player_index, bool debug = false);
34 ~ConfigureInputPlayer() override; 34 ~ConfigureInputPlayer() override;
35 35
36 /// Save all button configurations to settings file 36 /// Save all button configurations to settings file
@@ -62,7 +62,7 @@ private:
62 62
63 std::unique_ptr<Ui::ConfigureInputPlayer> ui; 63 std::unique_ptr<Ui::ConfigureInputPlayer> ui;
64 64
65 u8 player_index; 65 std::size_t player_index;
66 bool debug; 66 bool debug;
67 67
68 std::unique_ptr<QTimer> timeout_timer; 68 std::unique_ptr<QTimer> timeout_timer;