mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Remove wpi::ArrayRef std::initializer_list constructor (#1745)
This can be dangerous as it refers to a temporary, and GCC 9.0 warns about its use. Instead add std::initializer_list overloads to common places it was used in an initializer_list sense.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -44,7 +44,6 @@ void RecordingController::AddEventMarker(
|
||||
DriverStation::ReportError("Shuffleboard event name was not specified");
|
||||
return;
|
||||
}
|
||||
auto arr = wpi::ArrayRef<std::string>{
|
||||
description, ShuffleboardEventImportanceName(importance)};
|
||||
m_eventsTable->GetSubTable(name)->GetEntry("Info").SetStringArray(arr);
|
||||
m_eventsTable->GetSubTable(name)->GetEntry("Info").SetStringArray(
|
||||
{description, ShuffleboardEventImportanceName(importance)});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user