mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-26 04:56:49 +00:00
[input_common] Move variable declaration closer to usage
MSVC supplied with VS2022 generates "warning C4189: 'CALIBRATION_THRESHOLD': local variable is initialized but not referenced" which is treated as an error. Circumvent it by moving constexpr variable directly into body of lambda function.
This commit is contained in:
parent
660c6bec22
commit
11f4bf8a9a
|
@ -536,8 +536,6 @@ CalibrationConfigurationJob::CalibrationConfigurationJob(
|
||||||
std::function<void(u16, u16, u16, u16)> data_callback) {
|
std::function<void(u16, u16, u16, u16)> data_callback) {
|
||||||
|
|
||||||
std::thread([=, this] {
|
std::thread([=, this] {
|
||||||
constexpr u16 CALIBRATION_THRESHOLD = 100;
|
|
||||||
|
|
||||||
u16 min_x{UINT16_MAX};
|
u16 min_x{UINT16_MAX};
|
||||||
u16 min_y{UINT16_MAX};
|
u16 min_y{UINT16_MAX};
|
||||||
u16 max_x{};
|
u16 max_x{};
|
||||||
|
@ -546,6 +544,8 @@ CalibrationConfigurationJob::CalibrationConfigurationJob(
|
||||||
Status current_status{Status::Initialized};
|
Status current_status{Status::Initialized};
|
||||||
SocketCallback callback{[](Response::Version) {}, [](Response::PortInfo) {},
|
SocketCallback callback{[](Response::Version) {}, [](Response::PortInfo) {},
|
||||||
[&](Response::PadData data) {
|
[&](Response::PadData data) {
|
||||||
|
constexpr u16 CALIBRATION_THRESHOLD = 100;
|
||||||
|
|
||||||
if (current_status == Status::Initialized) {
|
if (current_status == Status::Initialized) {
|
||||||
// Receiving data means the communication is ready now
|
// Receiving data means the communication is ready now
|
||||||
current_status = Status::Ready;
|
current_status = Status::Ready;
|
||||||
|
|
Loading…
Reference in a new issue