Fixed non-const lvalue reference to type cannot bind to a temporary of type
This commit is contained in:
parent
23c72d825e
commit
ca5a1aaa71
|
@ -496,7 +496,7 @@ bool Settings::LoadConfig()
|
|||
continue;
|
||||
}
|
||||
|
||||
auto &lambda = [&control_names, &device](int num_buttons, const char *const ctrl_names[]) {
|
||||
const auto &lambda = [&control_names, &device](int num_buttons, const char *const ctrl_names[]) {
|
||||
for (int i = 0; i < num_buttons; i++) {
|
||||
char control_name[XBOX_BUTTON_NAME_LENGTH];
|
||||
std::sprintf(control_name, sect_input_profiles.control, ctrl_names[i]);
|
||||
|
@ -668,7 +668,7 @@ bool Settings::Save(std::string file_path)
|
|||
continue;
|
||||
}
|
||||
|
||||
auto &lambda = [&control_names, &device](int num_buttons, const char *const ctrl_names[]) {
|
||||
const auto &lambda = [&control_names, &device](int num_buttons, const char *const ctrl_names[]) {
|
||||
for (int i = 0; i < num_buttons; i++) {
|
||||
char control_name[XBOX_BUTTON_NAME_LENGTH];
|
||||
std::sprintf(control_name, sect_input_profiles.control, ctrl_names[i]);
|
||||
|
|
Loading…
Reference in New Issue