Skip to content

Commit 6eb6c06

Browse files
committed
use brace initialization consistently
1 parent bc0ec26 commit 6eb6c06

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/core/gather/gather.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212

1313
class Gather {
1414
public:
15-
int id;
16-
int nt;
17-
int nx;
18-
double dt;
15+
int id{};
16+
int nt{};
17+
int nx{};
18+
double dt{};
1919
std::vector<double> data;
2020

21-
// Gather() = default;
22-
Gather() {}
21+
Gather() = default;
2322

2423
Gather(const int id, const int nt, const int nx, const double dt)
25-
: id(id), nt(nt), nx(nx), dt(dt), data() {}
24+
: id{id}, nt{nt}, nx{nx}, dt{dt} {
25+
data.resize(nt * nx);
26+
}
2627

2728
[[nodiscard]] std::string display() const {
2829
return "Gather id: " + std::to_string(id);

0 commit comments

Comments
 (0)