Skip to content
Snippets Groups Projects
Commit 2a22c1b2 authored by Lioncash's avatar Lioncash
Browse files

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.
parent 0782d397
No related branches found
No related tags found
No related merge requests found
...@@ -104,7 +104,7 @@ static QString AnalogToText(const Common::ParamPackage& param, const std::string ...@@ -104,7 +104,7 @@ static QString AnalogToText(const Common::ParamPackage& param, const std::string
} }
}; };
ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, u8 player_index, bool debug) ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_index, bool debug)
: QDialog(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index(player_index), : QDialog(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index(player_index),
debug(debug), timeout_timer(std::make_unique<QTimer>()), debug(debug), timeout_timer(std::make_unique<QTimer>()),
poll_timer(std::make_unique<QTimer>()) { poll_timer(std::make_unique<QTimer>()) {
......
...@@ -30,7 +30,7 @@ class ConfigureInputPlayer : public QDialog { ...@@ -30,7 +30,7 @@ class ConfigureInputPlayer : public QDialog {
Q_OBJECT Q_OBJECT
public: public:
explicit ConfigureInputPlayer(QWidget* parent, u8 player_index, bool debug = false); explicit ConfigureInputPlayer(QWidget* parent, std::size_t player_index, bool debug = false);
~ConfigureInputPlayer() override; ~ConfigureInputPlayer() override;
/// Save all button configurations to settings file /// Save all button configurations to settings file
...@@ -62,7 +62,7 @@ private: ...@@ -62,7 +62,7 @@ private:
std::unique_ptr<Ui::ConfigureInputPlayer> ui; std::unique_ptr<Ui::ConfigureInputPlayer> ui;
u8 player_index; std::size_t player_index;
bool debug; bool debug;
std::unique_ptr<QTimer> timeout_timer; std::unique_ptr<QTimer> timeout_timer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment