Skip to content

Commit

Permalink
add braces around initialization to address clang-tidy
Browse files Browse the repository at this point in the history
it has: warning: suggest braces around initialization of subobject
  • Loading branch information
zingale committed Jan 26, 2024
1 parent 29c5f4d commit 4ffaa71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/driver/sum_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ Castro::gwstrain (Real time,

// Standard Kronecker delta.

Real delta[3][3] = {0.0};
Real delta[3][3] = {{0.0}};

for (int i = 0; i < 3; ++i) {
delta[i][i] = 1.0;
Expand All @@ -539,7 +539,7 @@ Castro::gwstrain (Real time,

// Projection operator onto the unit vector n.

Real proj[3][3][3][3] = {0.0};
Real proj[3][3][3][3] = {{0.0}};

for (int l = 0; l < 3; ++l) {
for (int k = 0; k < 3; ++k) {
Expand All @@ -554,7 +554,7 @@ Castro::gwstrain (Real time,

// Now we can calculate the strain tensor.

Real h[3][3] = {0.0};
Real h[3][3] = {{0.0}};

for (int l = 0; l < 3; ++l) {
for (int k = 0; k < 3; ++k) {
Expand Down

0 comments on commit 4ffaa71

Please sign in to comment.