Skip to content

Commit

Permalink
Double braces to silence compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jonclayden committed Jun 19, 2024
1 parent a19f0ee commit 471c7bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ BEGIN_RCPP
if (data.isComplex())
{
ComplexVector result(indices.length());
const Rcomplex naValue = { NA_REAL, NA_REAL };
const Rcomplex naValue = {{ NA_REAL, NA_REAL }};
for (int i=0; i<indices.length(); i++)
result[i] = (size_t(indices[i]) > data.size() ? naValue : data[indices[i] - 1]);
return result;
Expand Down Expand Up @@ -785,7 +785,7 @@ BEGIN_RCPP
if (data.isComplex())
{
ComplexVector result(count);
const Rcomplex naValue = { NA_REAL, NA_REAL };
const Rcomplex naValue = {{ NA_REAL, NA_REAL }};
for (size_t j=0; j<count; j++)
{
size_t loc = 0;
Expand Down

0 comments on commit 471c7bc

Please sign in to comment.