Commit 4a1a6e28 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[test] Fix usages of std::array initializer lists.

R=clemensh@chromium.org

Change-Id: I49ca12fc882dd19eb26b60ed64a36b023a836702
Reviewed-on: https://chromium-review.googlesource.com/868294Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50626}
parent 6c72df9e
......@@ -53,7 +53,7 @@ class CSignature : public MachineSignature {
static void VerifyParams(MachineSignature* sig) {
// Verifies the C signature against the machine types.
std::array<MachineType, sizeof...(Params)> params{
MachineTypeForC<Params>()...};
{MachineTypeForC<Params>()...}};
for (size_t p = 0; p < params.size(); ++p) {
CHECK_EQ(sig->GetParam(p), params[p]);
}
......@@ -67,7 +67,7 @@ class CSignature : public MachineSignature {
static CSignature* New(Zone* zone, MachineType ret,
ParamMachineTypes... params) {
constexpr size_t param_count = sizeof...(params);
std::array<MachineType, param_count> param_arr{params...};
std::array<MachineType, param_count> param_arr{{params...}};
const size_t buffer_size =
param_count + (ret == MachineType::None() ? 0 : 1);
MachineType* buffer = zone->NewArray<MachineType>(buffer_size);
......
......@@ -88,7 +88,7 @@ class BufferedRawMachineAssemblerTester
return_parameter_index_(sizeof...(p)) {
static_assert(sizeof...(p) <= arraysize(parameter_nodes_),
"increase parameter_nodes_ array");
std::array<MachineType, sizeof...(p)> p_arr{p...};
std::array<MachineType, sizeof...(p)> p_arr{{p...}};
for (size_t i = 0; i < p_arr.size(); ++i) {
parameter_nodes_[i] = Load(p_arr[i], RawMachineAssembler::Parameter(i));
}
......@@ -144,7 +144,7 @@ class BufferedRawMachineAssemblerTester<void>
MachineType::None(), p...)) {
static_assert(sizeof...(p) <= arraysize(parameter_nodes_),
"increase parameter_nodes_ array");
std::array<MachineType, sizeof...(p)> p_arr{p...};
std::array<MachineType, sizeof...(p)> p_arr{{p...}};
for (size_t i = 0; i < p_arr.size(); ++i) {
parameter_nodes_[i] = Load(p_arr[i], RawMachineAssembler::Parameter(i));
}
......
......@@ -190,7 +190,7 @@ class GraphBuilderTester : public HandleAndZoneScope,
template <typename... NodePtrs>
Node* NewNode(const Operator* op, NodePtrs... n) {
std::array<Node*, sizeof...(n)> inputs{n...};
std::array<Node*, sizeof...(n)> inputs{{n...}};
return MakeNode(op, inputs.size(), inputs.data());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment