mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +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:
@@ -135,9 +135,8 @@ TEST_F(WebSocketClientTest, ProtocolGood) {
|
||||
mockProtocol = "myProtocol";
|
||||
|
||||
clientPipe->Connect(pipeName, [&] {
|
||||
auto ws = WebSocket::CreateClient(
|
||||
*clientPipe, "/test", pipeName,
|
||||
ArrayRef<StringRef>{"myProtocol", "myProtocol2"});
|
||||
auto ws = WebSocket::CreateClient(*clientPipe, "/test", pipeName,
|
||||
{"myProtocol", "myProtocol2"});
|
||||
ws->closed.connect([&](uint16_t code, StringRef msg) {
|
||||
Finish();
|
||||
if (code != 1005 && code != 1006)
|
||||
|
||||
Reference in New Issue
Block a user